Observed since 20 Oct, 17:37 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A tool to automatically replace relative imports with absolute ones.
A tool and pre-commit hook to automatically convert relative imports to absolute.
$ pip install absolufy-imports
See pre-commit for instructions
Sample .pre-commit-config.yaml:
- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.0
hooks:
- id: absolufy-imports
$ absolufy-imports mypackage/myfile.py
- from . import __version__
+ from mypackage import __version__
If your package follows the popular ./src layout, you can pass your application directories via --application-directories, e.g.
$ absolufy-imports src/mypackage/myfile.py --application-directories src
- from . import __version__
+ from mypackage import __version__
Multiple application directories should be colon-separated, e.g. --application-directories .:src. This is the same as in reorder-python-imports.
Use the --never flag, e.g.
$ absolufy-imports mypackage/myfile.py --never
- from mypackage import __version__
+ from . import __version__
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.3.1 | 20 Jan 2022 | 0 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 20 Oct, 17:37 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:c1b9df8e93974142cc5165f892272d5a6ffa5c942f3f8122f07628ec7db55d82