only-relative-import
Linter to only allow relative imports!
Installation
pip install only-relative-import
Usage
You can either run the CLI or use it in the pre-commit.
CLI
only-relative-import --package-name <package_name>
Pre-commit
- repo:
rev: v0.1.0
hooks:
- id: only-relative-import
args: [--package-name, <package_name>]
License
This project is licensed under the terms of the MIT license.