diff --git a/AUTHORS.md b/AUTHORS.md index 11ef574..24aebe9 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -1,8 +1,16 @@ Credits ======= -`flake8-absolute-import` is authored and maintained by Brian Skinn ([Blog](https://bskinn.github.io)) ([Twitter](https://twitter.com/btskinn)). The skeleton of the AST-based implementation used for this plugin was shamelessly swiped from [`flake8-2020`](https://github.com/asottile/flake8-2020) by [Anthony Sottile](https://github.com/asottile). +`flake8-absolute-import` is authored and maintained by Brian Skinn +([Blog](https://bskinn.github.io)) ([Twitter](https://twitter.com/btskinn)). The +skeleton of the AST-based implementation used for this plugin was shamelessly +swiped from [`flake8-2020`](https://github.com/asottile/flake8-2020) by +[Anthony Sottile](https://github.com/asottile). -While there is disagreement about the upsides and downsides of relative imports in Python, as best this author can tell there are numerous projects and developers out there who desire to hold strictly to absolute imports in their code. The goal of this flake8 plugin is to simplify enforcement of this policy. +While there is disagreement about the upsides and downsides of relative imports +in Python, as best this author can tell there are numerous projects and +developers out there who desire to hold strictly to absolute imports in their +code. The goal of this flake8 plugin is to simplify enforcement of this policy. -v1.0 provides a single catch-all error, `ABS101`, raised on any relative imports found. +v1.0 provides a single catch-all error, `ABS101`, raised on any relative imports +found. diff --git a/CHANGELOG.md b/CHANGELOG.md index 179229d..ed90d11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,44 @@ and this project strives to adhere (mostly) to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +### [1.0.0.2] - 2023-10-08 + +This is an administrative release, primarily to update officially supported +Python and flake8 versions. There should be no plugin behavior changes between +this version and v1.0.0.1. + +#### Dependencies + +- Support for Python 3.12 was officially added + +- Support for Python 3.6 and 3.7 was officially removed, though the plugin + should continue to work for Python 3.6+ + +- The minimum supported flake8 version is now 5.0 + +#### Administrative + +- `MANIFEST.in` was augmented with the files needed to allow the test suite to + run from an unpacked sdist. + +- The build metadata was completely migrated from `setup.cfg` to + `pyproject.toml`, and the maximum possible metadata is now drawn from + `pyproject.toml` (all but `long_description`). + +- The read of the project version and the load of the README contents in + `setup.py` was modernized/improved. + +#### Testing + +- Python versions in the GitHub Actions and Azure Pipelines matrices were updated. + +- An Azure Pipelines job was added to confirm that a built sdist carries all the + files needed to allow the test suite to run. + +- Obscure parameters/variables in some tests were given better names, and string + formatting was upgraded to use f-strings. + + ### [1.0.0.1] - 2021-12-04 This is an administrative/metadata release, primarily to update officially @@ -15,36 +53,36 @@ this version and v1.0.0. #### Dependencies -- Support for Python 3.10 and 3.11-dev was officially added +- Support for Python 3.10 and 3.11-dev was officially added. -- Support for Python 3.5 was officially removed, though the plugin should - remain compatible +- Support for Python 3.5 was officially removed, though the plugin should remain + compatible. #### Testing -- Support for running the `tox` matrix on Windows was removed (it doesn't - seem to work right with the batch-files-in-bin-folder approach I use for - multiple Pythons in development) +- Support for running the `tox` matrix on Windows was removed (it doesn't seem + to work right with the batch-files-in-bin-folder approach I use for multiple + Pythons in development). -- Routine CI switched from Travis CI to GitHub Actions +- Routine CI was switched from Travis CI to GitHub Actions. -- CI and `tox` versions updated to focus on Python 3.10 +- CI and `tox` versions were updated to focus on Python 3.10. -- `pytest` and `coverage` configs revised to avoid `source`/`include` collision - in `coverage` +- `pytest` and `coverage` configs were revised to avoid `source`/`include` + collision in `coverage`. #### Administrative - `setuptools` configuration has been mostly ported to `setup.cfg`, except for the - pieces that still need to be defined dynamically + pieces that still need to be defined dynamically. - Built artifacts for distribution should now be created using `build`, which - has been added to `requirements-dev.txt` + has been added to `requirements-dev.txt`. ### [1.0.0] - 2019-09-09 #### Features -- Detect any relative imports and report with error code ABS101 +- Detect any relative imports and report with error code ABS101. diff --git a/LICENSE.txt b/LICENSE.txt index 7f9d634..3742dc3 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019-2021 Brian Skinn +Copyright (c) 2019-2023 Brian Skinn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.rst b/README.rst index 393e0a4..7044895 100644 --- a/README.rst +++ b/README.rst @@ -5,7 +5,7 @@ flake8-absolute-import **Current Development Version:** -.. image:: https://img.shields.io/github/workflow/status/bskinn/flake8-absolute-import/ci-tests?logo=github +.. 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 @@ -27,13 +27,16 @@ flake8-absolute-import .. 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 simple check of the AST for each +``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. @@ -57,8 +60,13 @@ and feature requests are welcomed at the Copyright (c) Brian Skinn 2019-2023 -License: The MIT License. See `LICENSE.txt `__ -for full license terms. +The ``flake8-absolute-import`` documentation (including docstrings and README) +is licensed under a +`Creative Commons Attribution 4.0 International License `__ +(CC-BY). The ``flake8-absolute-import`` codebase is released under the +`MIT License `__. See +`LICENSE.txt `__ for +full license terms. .. _ImportFrom: https://greentreesnakes.readthedocs.io/en/latest/nodes.html#ImportFrom .. |ImportFrom| replace:: ``ImportFrom`` diff --git a/pyproject.toml b/pyproject.toml index d19ef3b..cbc890c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,6 +65,9 @@ license-files = [ ] include-package-data = false +[tool.setuptools.dynamic] +version = {attr = "flake8_absolute_import.version.__version__"} + [tool.setuptools.package-dir] "" = "src" diff --git a/setup.py b/setup.py index ed30809..19adc57 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,6 @@ def content_update(content, pattern, sub): setup( - version=__version__, long_description=readme(), long_description_content_type="text/x-rst", ) diff --git a/src/flake8_absolute_import/__init__.py b/src/flake8_absolute_import/__init__.py index 808ebb0..5fe1ff3 100644 --- a/src/flake8_absolute_import/__init__.py +++ b/src/flake8_absolute_import/__init__.py @@ -3,13 +3,13 @@ flake8 plugin to require absolute imports **Author** - Brian Skinn (bskinn@alum.mit.edu) + Brian Skinn (brian.skinn@gmail.com) **File Created** 6 Sep 2019 **Copyright** - \(c) Brian Skinn 2019-2021 + \(c) Brian Skinn 2019-2023 **Source Repository** http://github.com/bskinn/flake8-absolute-import diff --git a/src/flake8_absolute_import/core.py b/src/flake8_absolute_import/core.py index 1073dbf..63ba5a2 100644 --- a/src/flake8_absolute_import/core.py +++ b/src/flake8_absolute_import/core.py @@ -3,13 +3,13 @@ flake8 plugin to require absolute imports **Author** - Brian Skinn (bskinn@alum.mit.edu) + Brian Skinn (brian.skinn@gmail.com) **File Created** 6 Sep 2019 **Copyright** - \(c) Brian Skinn 2019-2021 + \(c) Brian Skinn 2019-2023 **Source Repository** http://github.com/bskinn/flake8-absolute-import diff --git a/src/flake8_absolute_import/version.py b/src/flake8_absolute_import/version.py index e7492de..e7b00e5 100644 --- a/src/flake8_absolute_import/version.py +++ b/src/flake8_absolute_import/version.py @@ -3,13 +3,13 @@ flake8 plugin to require absolute imports **Author** - Brian Skinn (bskinn@alum.mit.edu) + Brian Skinn (brian.skinn@gmail.com) **File Created** 6 Sep 2019 **Copyright** - \(c) Brian Skinn 2019-2021 + \(c) Brian Skinn 2019-2023 **Source Repository** http://github.com/bskinn/flake8-absolute-import @@ -21,4 +21,4 @@ """ -__version__ = "1.0.1.dev0" +__version__ = "1.0.0.3.dev0" diff --git a/tests/test_plugin.py b/tests/test_plugin.py index 4db5ca4..ed24f3c 100644 --- a/tests/test_plugin.py +++ b/tests/test_plugin.py @@ -3,13 +3,13 @@ flake8 plugin to require absolute imports **Author** - Brian Skinn (bskinn@alum.mit.edu) + Brian Skinn (brian.skinn@gmail.com) **File Created** 6 Sep 2019 **Copyright** - \(c) Brian Skinn 2019-2021 + \(c) Brian Skinn 2019-2023 **Source Repository** http://github.com/bskinn/flake8-absolute-import