Skip to main content

Flake8 Absolute Imports Plugin

A Flake8 plugin that enforces absolute imports in Python projects.

Installation

pip install flake8-absolute-imports

Usage

Add to your flake8 configuration (e.g. .flake8):

[flake8]
plugins = flake8-absolute-imports
select = IA

Error Codes

Code Description
IA001 Relative imports are not allowed

Example

Bad:

from ..utils import helper  # IA001
from .models import User   # IA001

Good:

from my_project.utils import helper
from my_project.models import User

Development

Install development dependencies:

pip install -e .[dev]

Run tests:

pytest

Run flake8 with the plugin:

flake8 your_file.py

License

MIT

Download files

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

Source Distribution

flake8_extensions-0.1.1.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flake8_extensions-0.1.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file flake8_extensions-0.1.1.tar.gz.

File metadata

  • Download URL: flake8_extensions-0.1.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for flake8_extensions-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6f248de3a14232eaf43b2718fe165ea9dbff45563ac26f7bbfff929699cc5d8c
MD5 0b9e03b4338dd99c8ff48dc811b4f8ee
BLAKE2b-256 7c43254bdff9744ed726f5bb5a0c5d9b28af55871670bc687ca1a27934c048a0

See more details on using hashes here.

File details

Details for the file flake8_extensions-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for flake8_extensions-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1e7d8055256f3bcc8f2f5ea756a4f9a25fde4625c3e847668235d7a66e131c37
MD5 ac8fca2c4a223f82e0a14c88d2f05ff6
BLAKE2b-256 9fdcbf1e77acfe24ec562b2c0cdc703b094db2a14b17c4811ff3db83cff91e3c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page