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
15 changes: 15 additions & 0 deletions .bumper.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[tool.bumper]
current_version = "3.3.0"
versioning_type = "semver"

[[tool.bumper.files]]
file = "./pyproject.toml"
search = 'version = "{current_version}"'

[[tool.bumper.files]]
file = "./README.md"
search = "flake8-annotations/{current_version}"

[[tool.bumper.files]]
file = "./flake8_annotations/__init__.py"
search = '__version__ = "{current_version}"'
15 changes: 0 additions & 15 deletions .bumpversion.cfg

This file was deleted.

28 changes: 14 additions & 14 deletions .github/workflows/lint_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v7.0.0
- uses: actions/checkout@v7.0.1

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7.0.0
with:
python-version-file: "pyproject.toml"

- name: Install uv
uses: astral-sh/setup-uv@v8.3.2
uses: astral-sh/setup-uv@v10.2.0
with:
version: "0.11.x"
version: "0.12.x"
enable-cache: true
cache-dependency-glob: "uv.lock"

Expand All @@ -38,19 +38,19 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15-dev"]
python-version: ["3.11", "3.12", "3.13", "3.14", "3.15-dev"]
fail-fast: false

steps:
- uses: actions/checkout@v7.0.0
- uses: actions/checkout@v7.0.1

- name: Get Non-Hyphenated Python Version
id: get-pyver
run: |
echo "PYVER=$(cut -d '-' -f 1 <<< ${{ matrix.python-version }})" >> $GITHUB_OUTPUT

- name: Set up (release) Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
uses: actions/setup-python@v7.0.0
if: "!endsWith(matrix.python-version, '-dev')"
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -62,9 +62,9 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@v8.3.2
uses: astral-sh/setup-uv@v10.2.0
with:
version: "0.11.x"
version: "0.12.x"
enable-cache: true
cache-dependency-glob: "uv.lock"

Expand All @@ -78,7 +78,7 @@ jobs:
uv run tox -e ${{ steps.get-pyver.outputs.PYVER }}

- name: Cache coverage for ${{ matrix.python-version }}
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v7.0.1
with:
name: cov_py${{ matrix.python-version }}
path: .coverage
Expand All @@ -90,15 +90,15 @@ jobs:
needs: test

steps:
- uses: actions/checkout@v7.0.0
- uses: actions/checkout@v7.0.1

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7.0.0
with:
python-version-file: "pyproject.toml"

- name: Pull coverage workflow artifacts
uses: actions/download-artifact@v8
uses: actions/download-artifact@v8.0.1
with:
path: cov_cache/

Expand All @@ -116,7 +116,7 @@ jobs:
coverage report --format=markdown >> $GITHUB_STEP_SUMMARY

- name: Publish cov HTML
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@v7.0.1
with:
path: htmlcov/
name: cov_report_html
12 changes: 6 additions & 6 deletions .github/workflows/pypi_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,25 @@ jobs:
id-token: write

steps:
- uses: actions/checkout@v7.0.0
- uses: actions/checkout@v7.0.1

- name: Install uv
uses: astral-sh/setup-uv@v8.3.2
uses: astral-sh/setup-uv@v10.2.0
with:
version: "0.11.x"
enable-cache: true
version: "0.12.x"
enable-cache: false
cache-dependency-glob: "uv.lock"

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7.0.0
with:
python-version-file: "pyproject.toml"

- name: Build package
run: uv build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1.13
uses: pypa/gh-action-pypi-publish@v1.14.2
with:
print-hash: true

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog
Versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html) (`<major>`.`<minor>`.`<patch>`)

## [v3.3.0]
### Changed
* Python 3.11 is now the minimum supported version

## [v3.2.0]
### Changed
* Python 3.10 is now the minimum supported version
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# flake8-annotations
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/flake8-annotations/3.2.0?logo=python&logoColor=FFD43B)](https://pypi.org/project/flake8-annotations/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/flake8-annotations/3.3.0?logo=python&logoColor=FFD43B)](https://pypi.org/project/flake8-annotations/)
[![PyPI](https://img.shields.io/pypi/v/flake8-annotations?logo=Python&logoColor=FFD43B)](https://pypi.org/project/flake8-annotations/)
[![PyPI - License](https://img.shields.io/pypi/l/flake8-annotations?color=magenta)](https://github.com/sco1/flake8-annotations/blob/main/LICENSE)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/sco1/flake8-annotations/main.svg)](https://results.pre-commit.ci/latest/github/sco1/flake8-annotations/main)
Expand All @@ -23,15 +23,15 @@ You can verify it's being picked up by invoking the following in your shell:
<!-- [[[cog
import cog
from subprocess import PIPE, run
out = run(["flake8", "--version"], stdout=PIPE, encoding="ascii")
out = run(["flake8", "--version"], stdout=PIPE, encoding="ascii", env={"TYPER_USE_RICH": "0"})
ver_str = out.stdout.replace("\n", "")
cog.out(
f"```bash\n$ flake8 --version\n{ver_str}\n```"
)
]]] -->
```bash
$ flake8 --version
7.3.0 (flake8-annotations: 3.2.0, mccabe: 0.7.0, pycodestyle: 2.14.0, pyflakes: 3.4.0) CPython 3.14.4 on Windows
7.4.1 (flake8-annotations: 3.3.0, mccabe: 0.7.0, pycodestyle: 2.15.0, pyflakes: 4.0.2) CPython 3.14.8 on Windows
```
<!-- [[[end]]] -->

Expand Down
2 changes: 1 addition & 1 deletion flake8_annotations/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.2.0"
__version__ = "3.3.0"
4 changes: 2 additions & 2 deletions flake8_annotations/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def classify_error(function: Function, arg: Argument) -> error_codes.Error:
return error_code.from_argument(arg)


@lru_cache()
@lru_cache
def _return_error_classifier(
is_class_method: bool,
class_decorator_type: enums.ClassDecoratorType,
Expand All @@ -321,7 +321,7 @@ def _return_error_classifier(
return error_codes.ANN201


@lru_cache()
@lru_cache
def _argument_error_classifier(
is_class_method: bool,
is_first_arg: bool,
Expand Down
13 changes: 6 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "flake8-annotations"
version = "3.2.0"
version = "3.3.0"
description = "Flake8 Type Annotation Checks"
license = "MIT"
license-files = ["LICENSE"]
Expand All @@ -17,7 +17,6 @@ classifiers = [
"Development Status :: 6 - Mature",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
Expand All @@ -29,7 +28,7 @@ classifiers = [
"Typing :: Typed",
]

requires-python = ">=3.10"
requires-python = ">=3.11"
dependencies = [
"flake8>=5.0",
]
Expand All @@ -47,16 +46,16 @@ Changelog = "https://github.com/sco1/flake8-annotations/blob/main/CHANGELOG.md"
[dependency-groups]
dev = [
"black~=26.3",
"bump2version~=1.0",
"cogapp~=3.3",
"isort~=8.0",
"isort~=9.0",
"mypy~=2.1",
"pre-commit~=4.0",
"pytest~=9.0",
"pytest-check~=2.4",
"pytest-cov~=7.0",
"pytest-randomly~=4.0",
"pytest-randomly~=5.0",
"ruff~=0.6",
"sco1-bumper~=2.0",
"tox~=4.18",
"tox-uv~=1.11",
]
Expand Down Expand Up @@ -92,5 +91,5 @@ module-name = "flake8_annotations"
module-root = ""

[build-system]
requires = ["uv_build>=0.11.17,<0.12"]
requires = ["uv_build>=0.12.9,<0.13"]
build-backend = "uv_build"
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exclude_lines =
if TYPE_CHECKING:

[tox]
envlist = clean,py{3.10,3.11,3.12,3.13,3.14,3.15},cog
envlist = clean,py{3.11,3.12,3.13,3.14,3.15},cog
skip_missing_interpreters = True
isolated_build = True
requires =
Expand Down
Loading
Loading