Skip to content

Commit 2cdb73e

Browse files
authored
Merge pull request #5 from mikicz/chore/update-lint-and-versions
Use ruff formatter, test on 3.13
2 parents 7aca6f4 + 4d68d47 commit 2cdb73e

File tree

6 files changed

+20
-27
lines changed

6 files changed

+20
-27
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
- py311-pytest8
3030
- py312-pytest7
3131
- py312-pytest8
32+
- py313-pytest7
33+
- py313-pytest8
3234

3335
# Use GitHub's Linux Docker host
3436
runs-on: ubuntu-latest

.pre-commit-config.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@ default_language_version:
22
python: python3
33
repos:
44
- repo: https://github.com/charliermarsh/ruff-pre-commit
5-
rev: 'v0.0.283'
5+
rev: 'v0.7.0'
66
hooks:
77
- id: ruff
88
args: [ "--fix" ]
9-
- repo: https://github.com/psf/black
10-
rev: "23.7.0"
11-
hooks:
12-
- id: black
9+
- id: ruff-format
1310
- repo: https://github.com/pre-commit/pre-commit-hooks
14-
rev: "v4.4.0"
11+
rev: "v5.0.0"
1512
hooks:
1613
- id: trailing-whitespace
1714
- id: check-ast

pyproject.toml

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,30 +31,19 @@ python = "^3.9"
3131
pytest = ">7.3.2"
3232

3333
[tool.poetry.group.dev.dependencies]
34-
black = "^23.7.0"
35-
ruff = "^0.0.283"
34+
ruff = "^0.7.0"
3635
pytest-xdist = "^3.3.1"
3736

3837
[build-system]
3938
requires = ["poetry-core"]
4039
build-backend = "poetry.core.masonry.api"
4140

42-
[tool.black]
43-
line-length = 120
44-
target_version = ['py39', 'py310', 'py311', 'py312']
45-
include = '\.pyi?$'
46-
exclude = '''
47-
(
48-
/(
49-
\.git # exclude a few common directories in the
50-
| \.tox # root of the project
51-
| venv
52-
)/
53-
)
54-
'''
41+
[tool.ruff]
5542

43+
line-length = 120
44+
target-version = "py310"
5645

57-
[tool.ruff]
46+
[tool.ruff.lint]
5847
select = [
5948
# https://github.com/charliermarsh/ruff#pyflakes-f
6049
"F",
@@ -83,8 +72,7 @@ select = [
8372
"SIM",
8473
]
8574

86-
line-length = 120
87-
target-version = "py310"
75+
8876

8977
# Never enforce...
9078
ignore = [
@@ -98,7 +86,7 @@ ignore = [
9886
"B027", # empty-method-without-abstract-decorator
9987
]
10088

101-
[tool.ruff.flake8-pytest-style]
89+
[tool.ruff.lint.flake8-pytest-style]
10290
fixture-parentheses = false
10391
mark-parentheses = false
10492
parametrize-names-type = "list"

pytest_unused_fixtures/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def _write_fixtures(self, config: Config, terminalreporter: TerminalReporter, fi
9393
continue
9494
tw.write(f"{fixture.argname}", green=True)
9595
if fixture.scope != "function":
96-
tw.write(" [%s scope]" % fixture.scope, cyan=True)
96+
tw.write(f" [{fixture.scope} scope]", cyan=True)
9797
tw.write(f" -- {fixture.pretty_path}:{fixture.lineno}", yellow=True)
9898
tw.write("\n")
9999

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist =
3-
py{39,310,311,312}-pytest{7,8}
3+
py{39,310,311,312,313}-pytest{7,8}
44
isolated_build = true
55

66
[testenv]

0 commit comments

Comments
 (0)