GitXplorerGitXplorer
b

flake8-absolute-import

public
12 stars
2 forks
2 issues

Commits

List of commits on branch main.
Unverified
f4c38aabebf9fc9a906a272ba5f2713a4139240c

Adjust README wording

bbskinn committed a year ago
Unverified
67d25ccc478a4899a91b984e906e4478c97b4c4b

Bump version to 1.0.0.2

bbskinn committed a year ago
Unverified
75ae3a4e7843f84b202dcbfdb4bc8a15f3b710a4

Switch version def from setup.py to pyproject.toml

bbskinn committed a year ago
Unverified
81d7fa65dc909a6a2de5e5e0f8adeaf23b10d79c

Add CC-BY to license blurb

bbskinn committed a year ago
Unverified
9bc8cb7ae422f1e427f3815ea05aadde4488b43d

Update copyright dates and contact email

bbskinn committed a year ago
Verified
e54b315d4dd4b4d6d57208a2ef8cfe23a5c54202

Merge pull request #20 from bskinn/fix-tox

bbskinn committed a year ago

README

The README file for this repository.

flake8-absolute-import

flake8 plugin to require absolute imports

Current Development Version:

.. image:: https://img.shields.io/github/actions/workflow/status/bskinn/flake8-absolute-import/ci_tests.yml?branch=main&logo=github :alt: GitHub Workflow Status :target: https://github.com/bskinn/flake8-absolute-import/actions

.. image:: https://codecov.io/gh/bskinn/flake8-absolute-import/branch/main/graph/badge.svg :target: https://codecov.io/gh/bskinn/flake8-absolute-import

Most Recent Stable Release:

.. image:: https://img.shields.io/pypi/v/flake8-absolute-import.svg?logo=pypi :target: https://pypi.org/project/flake8-absolute-import

.. image:: https://img.shields.io/pypi/pyversions/flake8-absolute-import.svg?logo=python

Info:

.. image:: https://img.shields.io/github/license/mashape/apistatus.svg :target: https://github.com/bskinn/flake8-absolute-import/blob/stable/LICENSE.txt

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/psf/black

.. image:: https://pepy.tech/badge/flake8-absolute-import/month :target: https://pepy.tech/project/flake8-absolute-import


Don't like relative imports?

Lint 'em out!

flake8-absolute-import uses a direct check of the AST for each from x import y statement to flag relative imports. Specifically, it checks for a nonzero level attribute on each |ImportFrom|_ node.

Relative imports raise the ABS101 error code:

.. code:: python

from foo import bar   # OK
from .foo import bar  # ABS101

Available on PyPI <https://pypi.python.org/pypi/flake8-absolute-import>__ (pip install flake8-absolute-import). flake8 should automatically detect and load the plugin. flake8>=5.0 is required.

Source on GitHub <https://github.com/bskinn/flake8-absolute-import>. Bug reports and feature requests are welcomed at the Issues <https://github.com/bskinn/flake8-absolute-import/issues> page there.

Copyright (c) Brian Skinn 2019-2023

The flake8-absolute-import documentation (including docstrings and README) is licensed under a Creative Commons Attribution 4.0 International License <http://creativecommons.org/licenses/by/4.0/>__ (CC-BY). The flake8-absolute-import codebase is released under the MIT License <https://opensource.org/licenses/MIT>. See LICENSE.txt <https://github.com/bskinn/flake8-absolute-import/blob/main/LICENSE.txt> for full license terms.

.. _ImportFrom: https://greentreesnakes.readthedocs.io/en/latest/nodes.html#ImportFrom .. |ImportFrom| replace:: ImportFrom