flake8-import-as-module
A Flake8 plugin to check if specific packages are imported as modules.
Installation
Via Pipenv:
pipenv install --dev flake8 flake8-import-as-module
Flake8 codes
| Package | Code | Description |
|---|---|---|
| Altair | IM001 | from altair import ... is unconventional. altair should be imported as a module. |
| pandas | IM002 | from pandas import ... is unconventional. pandas should be imported as a module. |
References
- https://docs.python.org/3.7/tutorial/modules.html
- https://stackoverflow.com/a/49072655
- https://github.com/marcgibbons/flake8-datetime-import
- https://github.com/joaopalmeiro/flake8-import-conventions
- https://github.com/asottile/flake8-2020
Development
poetry install --with dev
poetry shell
pytest tests/ -v
Copy the output of the following script and paste it in the Flake8 codes section:
python gen_table.py
If changes are not reflected in VS Code after changing something in the package, close it and open it again.
Deployment
poetry check
poetry version minor
or
poetry version patch
Commit the change in the pyproject.toml file.
git tag
git tag "v$(poetry version --short)"
git push origin "v$(poetry version --short)"
Metadata
Release files for flake8-import-as-module 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flake8_import_as_module-0.1.0.tar.gz | 4.6 kB | Without provenance | Details for flake8_import_as_module-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flake8_import_as_module-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for flake8_import_as_module-0.1.0-py3-none-any.whl |
Total release size: 10.0 kB
Release files / flake8_import_as_module-0.1.0.tar.gz
| Download URL | flake8_import_as_module-0.1.0.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b2b0a19f0ba7b83b7b7cf184cdf95816478670e40439241557d1b7f8de8e007
|
|
BLAKE2b-256 checksum How to use checksums |
04633eb3bdbe1f1f16ca3b81ac31bdd4d178572714112065522a3fdb6ed8d341
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.7.15 Linux/5.15.0-1031-azure
|
Release files / flake8_import_as_module-0.1.0-py3-none-any.whl
| Download URL | flake8_import_as_module-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
99a49785dfc0752608e64fb26df68fa58d18b05874c10daaa9df2f71f1b30d30
|
|
BLAKE2b-256 checksum How to use checksums |
48befdee445206c6639c8ca41259726e67c39fe8f75f4fbb598b550306ac7fb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.7.15 Linux/5.15.0-1031-azure
|
Security for flake8-import-as-module 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.