Skip to content

Commit 9e2f044

Browse files
committed
Upgrade dependencies, including config adaptations for ruff 0.2 and code changes for Pyright 1.1.348 breaking changes
1 parent 575f5c7 commit 9e2f044

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

.github/workflows/Tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
os: [ubuntu-22.04]
14-
python: ["3.10", "3.11"]
14+
python: ["3.11", "3.12"]
1515
runs-on: ${{ matrix.os }}
1616

1717
steps:
@@ -32,7 +32,7 @@ jobs:
3232
run: inv coverage --args "-vvv"
3333

3434
- name: Upload coverage report to codecov
35-
if: matrix.python == '3.11'
35+
if: matrix.python == '3.12'
3636
uses: codecov/codecov-action@v3
3737
with:
3838
token: ${{ secrets.CODECOV_TOKEN }}

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.4.0
5+
rev: v4.5.0
66
hooks:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
99
- repo: https://github.com/psf/black
10-
rev: "23.7.0"
10+
rev: "24.1.1"
1111
hooks:
1212
- id: black
1313
- repo: https://github.com/astral-sh/ruff-pre-commit
14-
rev: v0.0.282
14+
rev: v0.2.0
1515
hooks:
1616
- id: ruff
1717
- repo: https://github.com/RobertCraigie/pyright-python
18-
rev: v1.1.320
18+
rev: v1.1.349
1919
hooks:
2020
- id: pyright
2121
name: pyright (system)

pyproject.toml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "great-project"
7-
requires-python = ">=3.12,<3.13"
7+
requires-python = ">=3.11,<3.13"
88
description = "A Great Project"
99
readme = "README.md"
1010
dependencies = [
@@ -20,19 +20,19 @@ scripts = [
2020
"invoke==2.2.0",
2121
]
2222
lint = [
23-
"black==23.7.0",
24-
"ruff==0.0.282",
23+
"black==24.1.1",
24+
"ruff==0.2.0",
2525
]
2626
check = [
27-
"pyright==1.1.320",
27+
"pyright==1.1.349",
2828
]
2929
test = [
30-
"pytest==7.4.0",
31-
"coverage==7.2.7",
30+
"pytest==8.0.0",
31+
"coverage==7.4.1",
3232
]
3333
dev = [
34-
"pre-commit==3.3.3",
35-
"debugpy==1.6.7",
34+
"pre-commit==3.6.0",
35+
"debugpy==1.8.0",
3636
"great-project[scripts]",
3737
"great-project[lint]",
3838
"great-project[test]",
@@ -97,6 +97,8 @@ target-version = ['py310']
9797
target-version = "py311"
9898
line-length = 88
9999
src = ["src"]
100+
101+
[tool.ruff.lint]
100102
select = [
101103
"A", # flake8-builtins
102104
# "ANN", # flake8-annotations
@@ -173,17 +175,17 @@ unfixable = [
173175
"F401",
174176
]
175177

176-
[tool.ruff.isort]
178+
[tool.ruff.lint.isort]
177179
known-first-party = ["great_project"]
178180

179-
[tool.ruff.flake8-bugbear]
181+
[tool.ruff.lint.flake8-bugbear]
180182
# add exceptions to B008 for fastapi.
181183
extend-immutable-calls = ["fastapi.Depends", "fastapi.Query"]
182184

183-
[tool.ruff.flake8-tidy-imports]
185+
[tool.ruff.lint.flake8-tidy-imports]
184186
ban-relative-imports = "all"
185187

186-
[tool.ruff.per-file-ignores]
188+
[tool.ruff.lint.per-file-ignores]
187189
# Tests can use magic values, assertions, and relative imports
188190
"tests/**/*" = ["PLR2004", "S101", "TID252"]
189191

tests/test_basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ def test_version():
1313
def test_compute():
1414
assert compute(1, 2) == 3
1515
with pytest.raises(TypeError):
16-
compute(1.0, 2) # pyright: ignore [reportGeneralTypeIssues]
16+
compute(1.0, 2) # pyright: ignore [reportArgumentType]
1717
assert entrypoint() is None

0 commit comments

Comments
 (0)