Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
# E704 multiple statements on one line (def) -- disallows function body on the same line as the def
#
# flake8-bugbear rules that cause too many false positives:
# B905 "`zip()` without an explicit `strict=True` parameter --
# the `strict` parameter was introduced in Python 3.10; we support Python 3.9
# B907 "Use !r inside f-strings instead of manual quotes" --
# produces false positives if you're surrounding things with double quotes

Expand All @@ -29,5 +27,5 @@ max-line-length = 80
max-complexity = 12
noqa-require-code = true
per-file-ignores =
*.py: B905, B907, B950, E203, E501, W503, W291, W293
*.py: B907, B950, E203, E501, W503, W291, W293
*.pyi: B, E301, E302, E305, E501, E701, E704, F821, W503
8 changes: 4 additions & 4 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ jobs:
timeout-minutes: 5
strategy:
matrix:
python-version: ["3.9", "3.14"]
python-version: ["3.10", "3.14"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
- run: |
uv run --python=3.13 --group=dev mypy --python-version=${{ matrix.python-version }}
uv run --python=3.14 --group=dev mypy --python-version=${{ matrix.python-version }}

flake8:
name: flake8
Expand All @@ -45,7 +45,7 @@ jobs:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
- run: |
uv run --python=3.13 --group=dev flake8 $(git ls-files | grep 'py$') --color=always
uv run --python=3.14 --group=dev flake8 $(git ls-files | grep 'py$') --color=always

tests:
name: pytest suite
Expand All @@ -54,7 +54,7 @@ jobs:
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/typeshed_primer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
python-version: "3.14"
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: uv pip install flake8-noqa --system
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ repos:
- id: name-tests-test
args: [--pytest-test-first]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.11.0 # must match pyproject.toml
rev: 25.12.0 # must match pyproject.toml
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 6.1.0 # must match pyproject.toml
rev: 7.0.0 # must match pyproject.toml
hooks:
- id: isort
name: isort (python)
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ flake8-pyi uses Calendar Versioning (CalVer).

* Y068: Don't use `@override` in stub files

### Other changes

* Drop support for Python 3.9

## 25.5.0

### New Error Codes
Expand Down
3 changes: 1 addition & 2 deletions flake8_pyi/visitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2114,8 +2114,7 @@ def visit_arg(self, node: ast.arg) -> None:
def visit_arguments(self, node: ast.arguments) -> None:
args = node.posonlyargs + node.args
defaults = [None] * (len(args) - len(node.defaults)) + node.defaults
assert len(args) == len(defaults)
for arg, default in zip(args, defaults):
for arg, default in zip(args, defaults, strict=True):
self.check_arg_default(arg, default)
if node.vararg is not None:
self.visit(node.vararg)
Expand Down
9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ maintainers = [
description = "A plugin for flake8 to enable linting .pyi stub files."
license = "MIT"
readme = "README.md"
requires-python = ">=3.9"
requires-python = ">=3.10"
keywords = [
"flake8",
"pyi",
Expand All @@ -37,7 +37,6 @@ classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand All @@ -53,10 +52,10 @@ dependencies = [

[dependency-groups]
dev = [
"black==25.11.0", # Must match .pre-commit-config.yaml
"black==25.12.0", # Must match .pre-commit-config.yaml
"flake8-bugbear==24.12.12",
"flake8-noqa==1.4.0",
"isort==6.1.0", # Must match .pre-commit-config.yaml
"isort==7.0.0", # Must match .pre-commit-config.yaml
"mypy==1.15.0",
"pre-commit-hooks==5.0.0", # Must match .pre-commit-config.yaml
"pytest==8.3.5",
Expand Down Expand Up @@ -86,7 +85,7 @@ skip = ["tests/imports.pyi", "tests/pep604_union_types.pyi"]
skip_gitignore = true

[tool.black]
target-version = ['py39']
target-version = ['py310']
skip-magic-trailing-comma = true
force-exclude = ".*\\.pyi"

Expand Down