Skip to content

Commit

Permalink
No longer emit a FutureWarning when run with flake8<5; add a CI job…
Browse files Browse the repository at this point in the history
… to run with flake8<5 (#293)
  • Loading branch information
AlexWaygood authored Oct 6, 2022
1 parent d8511bd commit b39240b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,21 @@ jobs:
- run: pip install -e .
- run: pip install -r requirements-dev.txt
- run: python3 -m pytest -vv
tests-flake8-v4:
name: pytest suite with flake8 v4
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
# Run on Python 3.7, as the importlib_metadata compatibility problems with flake8 v5
# are much less on Python 3.8+, where importlib.metadata is available in the stdlib
python-version: 3.7
- run: pip install "flake8<5"
- run: pip install -e .
- run: pip install -r requirements-dev.txt
- run: python3 -m pytest -vv
check-typeshed:
name: typeshed_primer
timeout-minutes: 5
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ Bugfixes:
`__all__` definitions.
* Expand Y015 so that errors are emitted for assignments to negative numbers.

Other changes:
* Since v22.8.1, flake8-pyi has emitted a `FutureWarning` if run with flake8<5,
warning that the plugin would soon become incompatible with flake8<5. Due to
some issues that mean that some users are unable to upgrade to flake8>=5,
however, flake8-pyi no longer intends to remove support for running the
plugin with flake8<5 before Python 3.7 has reached end-of-life. As such, the
`FutureWarning` is no longer emitted.

## 22.8.2

New error codes:
Expand Down
13 changes: 0 additions & 13 deletions pyi.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,6 @@ def unparse(node: ast.AST) -> str:
LOG = logging.getLogger("flake8.pyi")
FLAKE8_MAJOR_VERSION = flake8.__version_info__[0]

if FLAKE8_MAJOR_VERSION < 5:
import warnings

warnings.warn(
(
"flake8-pyi will drop support for running with flake8 < 5.0.0 "
"in a future version. This will not happen until November 2022 "
"at the earliest."
),
category=FutureWarning,
)


if sys.version_info >= (3, 9):
_LiteralMember: TypeAlias = ast.expr
else:
Expand Down

0 comments on commit b39240b

Please sign in to comment.