Pylint plugin which adds linter error for relatives imports.Read more about imports at https://peps.python.org/pep-0008/#imports
Project description
Pylint force absolute imports plugin
What for?
Following PEP8 recommendation about imports, import statements should be absolute :
Standard library code should avoid complex package layouts and always use absolute imports.
# project/
# |---- __init__.py
# |---- employee.py
from .employee import Employee # <- BAD
from project.employee import Employee # <- Good
Installation
pip install pylint_absolute_imports
Usage
In pylint.rc:
[MASTER]
load-plugins=pylint_absolute_imports
Or, in terminal:
pylint --load-plugins pylint_relative_imports foo.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pylint_absolute_imports-1.0.1-py3-none-any.whl.
File metadata
- Download URL: pylint_absolute_imports-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e70d96abbad2fe0bdc3dbae05e1a1b7963dea5b7df4cb63e001f7248de46acd3
|
|
| MD5 |
a9c7e987357f16b05e35b0ba4efcfd8e
|
|
| BLAKE2b-256 |
762d3837ab3bde9c2c07fd860b41ac75cf09ab30e7a7cdd4927d5de66be4cec6
|