https://github.com/kludex/only-relative-import
Only allow relative imports! 😅
https://github.com/kludex/only-relative-import
Last synced: 2 months ago
JSON representation
Only allow relative imports! 😅
- Host: GitHub
- URL: https://github.com/kludex/only-relative-import
- Owner: Kludex
- License: mit
- Created: 2023-05-02T12:15:18.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-08T12:38:07.000Z (over 2 years ago)
- Last Synced: 2025-06-30T12:24:07.550Z (3 months ago)
- Language: Python
- Size: 5.86 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
only-relative-import
Linter to only allow relative imports! :sweat_smile:
## Installation
```bash
pip install only-relative-import
```## Usage
You can either run the CLI or use it in the pre-commit.
### CLI
```bash
only-relative-import --package-name
```### Pre-commit
```yaml
- repo:
rev: v0.1.0
hooks:
- id: only-relative-import
args: [--package-name, ]
```## License
This project is licensed under the terms of the MIT license.