Skip to main content

A Flake8 plugin to check if specific packages are imported as modules.

Project description

flake8-import-as-module

PyPI

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

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)"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flake8_import_as_module-0.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

flake8_import_as_module-0.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file flake8_import_as_module-0.1.0.tar.gz.

File metadata

  • Download URL: flake8_import_as_module-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.7.15 Linux/5.15.0-1031-azure

File hashes

Hashes for flake8_import_as_module-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9b2b0a19f0ba7b83b7b7cf184cdf95816478670e40439241557d1b7f8de8e007
MD5 7aaf5b355d3c0fee9ac7af3c65c9344c
BLAKE2b-256 04633eb3bdbe1f1f16ca3b81ac31bdd4d178572714112065522a3fdb6ed8d341

See more details on using hashes here.

File details

Details for the file flake8_import_as_module-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flake8_import_as_module-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 99a49785dfc0752608e64fb26df68fa58d18b05874c10daaa9df2f71f1b30d30
MD5 7814e47b68cf5b8b433c2a741412e92d
BLAKE2b-256 48befdee445206c6639c8ca41259726e67c39fe8f75f4fbb598b550306ac7fb1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page