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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

os: [ubuntu-latest]

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/flake8_py_version_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python 3.12
- name: Set up Python3
uses: actions/setup-python@v6
with:
python-version: 3.12
allow-prereleases: true
- name: run script
run: python scripts/flake8_py_version_check.py
2 changes: 1 addition & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ You can also use [tox](https://tox.wiki/en/latest/index.html) to test with multi
```console
/path/to/venv/bin/tox
```
will by default run all tests on python versions 3.9 through 3.13. If you only want to test a specific version you can specify the environment with `-e`
will by default run all tests on python versions 3.10 through 3.14. If you only want to test a specific version you can specify the environment with `-e`

```console
/path/to/venv/bin/tox -e py313
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Quality Assurance",
]
requires-python = ">=3.9"
requires-python = ">=3.10"
dependencies = ["flake8>=7.2.0", "attrs>=22.2.0"]
dynamic = ["version"]

Expand Down
2 changes: 1 addition & 1 deletion tests/eval_files/b912_py314.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
map(lambda x: x, "a", "b") # B912: 0
map(lambda x: x, "a", "b", *map("c")) # B912: 0
map(lambda x: x, "a", map(lambda x: x, "a"), strict=True) # B912: 22
map(lambda x: x, "a", map(lambda x: x, "a"), strict=True)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kasium - This makes sense right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, seems like a mistake I did


map()
map(lambda x: x, "a")
Expand Down
10 changes: 9 additions & 1 deletion tests/test_bugbear.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import subprocess
import sys
import unittest
import warnings
from argparse import Namespace
from pathlib import Path

Expand Down Expand Up @@ -54,7 +55,14 @@ def test_eval(
]

bbc = BugBearChecker(filename=str(path), options=options)
errors = [e for e in bbc.run() if (test == "B950" or not e[2].startswith("B950"))]
# Suppress SyntaxWarnings for B012 tests which intentionally contain
# return/break/continue in finally blocks (SyntaxWarning in Python 3.14+)
with warnings.catch_warnings():
if test.startswith("B012"):
warnings.filterwarnings("ignore", category=SyntaxWarning)
errors = [
e for e in bbc.run() if (test == "B950" or not e[2].startswith("B950"))
]
errors.sort()
assert errors == tuple_expected

Expand Down
6 changes: 2 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ envlist = py39, py310, py311, py312, py313, pep8_naming, mypy

[gh-actions]
python =
3.9: py39
3.10: py310
3.11: py311,pep8_naming
3.12: py312
3.13: py313,mypy
# blocked by https://github.com/ijl/orjson/issues/569
# 3.14: py314
3.14: py314

[testenv]
description = Run coverage
Expand All @@ -35,7 +33,7 @@ commands =
coverage run -m pytest tests/test_bugbear.py -k b902 {posargs}
coverage report -m

[testenv:{py39-,py310-,py311-,py312-,py313-}mypy]
[testenv:{py310-,py311-,py312-,py313-,py314-}mypy]
deps =
mypy
commands =
Expand Down