Skip to content

Commit

Permalink
Merge pull request #22 from bskinn/release-1.0.0.2
Browse files Browse the repository at this point in the history
Release 1.0.0.2 back-merge, post release
  • Loading branch information
bskinn authored Oct 9, 2023
2 parents e54b315 + 6da7f75 commit 906895b
Show file tree
Hide file tree
Showing 10 changed files with 87 additions and 31 deletions.
14 changes: 11 additions & 3 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -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.
64 changes: 51 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.

2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 12 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Expand All @@ -57,8 +60,13 @@ and feature requests are welcomed at the

Copyright (c) Brian Skinn 2019-2023

License: The MIT License. See `LICENSE.txt <https://github.com/bskinn/flake8-absolute-import/blob/main/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 <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``
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def content_update(content, pattern, sub):


setup(
version=__version__,
long_description=readme(),
long_description_content_type="text/x-rst",
)
4 changes: 2 additions & 2 deletions src/flake8_absolute_import/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
flake8 plugin to require absolute imports
**Author**
Brian Skinn ([email protected])
Brian Skinn ([email protected])
**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
Expand Down
4 changes: 2 additions & 2 deletions src/flake8_absolute_import/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
flake8 plugin to require absolute imports
**Author**
Brian Skinn ([email protected])
Brian Skinn ([email protected])
**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
Expand Down
6 changes: 3 additions & 3 deletions src/flake8_absolute_import/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
flake8 plugin to require absolute imports
**Author**
Brian Skinn ([email protected])
Brian Skinn ([email protected])
**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
Expand All @@ -21,4 +21,4 @@
"""

__version__ = "1.0.1.dev0"
__version__ = "1.0.0.3.dev0"
4 changes: 2 additions & 2 deletions tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
flake8 plugin to require absolute imports
**Author**
Brian Skinn ([email protected])
Brian Skinn ([email protected])
**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
Expand Down

0 comments on commit 906895b

Please sign in to comment.