- Drop Python 3.8 support.
- Support Python 3.13.
- Drop Python 3.7 support.
- Support Python 3.12.
- Support Python 3.11.
Add Mypy-style wildcard support to
banned-modules
.Thanks to Chris Elion in PR #319.
- Drop Python 3.6 support.
- Remove upper bound on Flake8 version.
- Support Flake8 4.
- Correctly declare dependency on flake8 3.8.0+. This is required as flake8
moved from optparse to argparse, and the change to
ban-relative-imports
uses argparse features.
- Add
parents
option forban-relative-imports
that allows using relative syntax to import from sibling modules, but not parents. - Add type hints.
- Support Python 3.10.
- Stop distributing tests to reduce package size. Tests are not intended to be run outside of the tox setup in the repository. Repackagers can use GitHub's tarballs per tag.
- Improved installation instructions in README.
- Drop Python 3.5 support.
- Support Python 3.9.
- Move license from ISC to MIT License.
- Make
{python2to3}
banfunctools.wraps
in favour ofsix.wraps
.
- Fix
cStringIO
message for{python2to3}
built-inbanned-modules
. Previously it looked forcStringIO.cStringIO
which seems to never have existed.
Add 50 to all rule codes to avoid conflict with
flake8-import-order
. This means ruleI200
is nowI250
, etc.If you have configured flake8's select or ignore options, you may need to update it to keep the
flake8-tidy-imports
rules active.
- Support Python 3.8.
- Converted setuptools metadata to configuration file. This meant removing the
__version__
attribute from the package. If you want to inspect the installed version, useimportlib.metadata.version("flake8-tidy-imports")
(docs / backport). - Add dependency on
importlib-metadata
.
- Add rule
I202
to ban relative imports, when activated with the newban-relative-imports
configuration option. - Update Python support to 3.5-3.7, as 3.4 has reached its end of life.
- Update Flake8 support to 3.0+ only. 3.0.0 was released in 2016 and the plugin hasn't been tested with it since.
- Drop Python 2 support, only Python 3.4+ is supported now.
- Added a big list of python 2 to 3 import bans for I201, which can be
activated by adding
{python2to3}
to thebanned-modules
option.
- Fixed the whitespace in the help message for
--banned-modules
.
- Changed the error message for
I201
to be about the banned import instead of module. - Fix a bug introduced in 1.0.4 that broke parsing relative imports.
- Don't allow installation with Flake8 3.2.0 which doesn't enable the plugin. This bug was fixed in Flake8 3.2.1.
- Use the most specific message available for a banned import.
- Fixed reading config from flake8 3+
- Fixed
I201
rule to detect banned imports likefrom x import y
.
I201
rule that allows you to configure complaining about certain modules being imported, e.g. if you are moving from Python 2 to 3 you could stopurlparse
being imported in favour ofsix.moves.urllib.parse
.
- First release on PyPI.
I200
rule that complains about unnecessary import aliasing, e.g.from foo import bar as bar
.