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

Uploaded Source

Built Distribution

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

Uploaded Python 3

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