Skip to content

Commit 3615841

Browse files
authored
Merge pull request #44 from hugovk/update-config
2 parents 157d0de + fc1f891 commit 3615841

File tree

6 files changed

+46
-37
lines changed

6 files changed

+46
-37
lines changed

.flake8

-2
This file was deleted.

.github/workflows/deploy.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
with:
2626
fetch-depth: 0
2727

28-
- uses: hynek/build-and-inspect-python-package@v1
28+
- uses: hynek/build-and-inspect-python-package@v2
2929

3030
# Upload to Test PyPI on every commit on main.
3131
release-test-pypi:
@@ -42,7 +42,7 @@ jobs:
4242

4343
steps:
4444
- name: Download packages built by build-and-inspect-python-package
45-
uses: actions/download-artifact@v3
45+
uses: actions/download-artifact@v4
4646
with:
4747
name: Packages
4848
path: dist
@@ -66,7 +66,7 @@ jobs:
6666

6767
steps:
6868
- name: Download packages built by build-and-inspect-python-package
69-
uses: actions/download-artifact@v3
69+
uses: actions/download-artifact@v4
7070
with:
7171
name: Packages
7272
path: dist

.github/workflows/lint.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Lint
22

33
on: [push, pull_request, workflow_dispatch]
44

5+
env:
6+
FORCE_COLOR: 1
7+
58
permissions:
69
contents: read
710

@@ -14,4 +17,5 @@ jobs:
1417
- uses: actions/setup-python@v5
1518
with:
1619
python-version: "3.x"
17-
- uses: pre-commit/[email protected]
20+
cache: pip
21+
- uses: pre-commit/[email protected]

.github/workflows/test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
tox -e py
3535
3636
- name: Upload output images
37-
uses: actions/upload-artifact@v3
37+
uses: actions/upload-artifact@v4
3838
with:
39-
name: images
39+
name: images-${{ matrix.os }}-${{ matrix.python-version }}
4040
path: "*.png"

.pre-commit-config.yaml

+8-26
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,15 @@
11
repos:
2-
- repo: https://github.com/asottile/pyupgrade
3-
rev: v3.15.0
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.2.1
44
hooks:
5-
- id: pyupgrade
6-
args: [--py38-plus]
5+
- id: ruff
6+
args: [--exit-non-zero-on-fix]
77

88
- repo: https://github.com/psf/black-pre-commit-mirror
9-
rev: 23.12.1
9+
rev: 24.1.1
1010
hooks:
1111
- id: black
1212

13-
- repo: https://github.com/PyCQA/isort
14-
rev: 5.13.2
15-
hooks:
16-
- id: isort
17-
18-
- repo: https://github.com/PyCQA/flake8
19-
rev: 6.1.0
20-
hooks:
21-
- id: flake8
22-
additional_dependencies:
23-
[flake8-2020, flake8-errmsg, flake8-implicit-str-concat]
24-
25-
- repo: https://github.com/pre-commit/pygrep-hooks
26-
rev: v1.10.0
27-
hooks:
28-
- id: python-check-blanket-noqa
29-
- id: python-no-log-warn
30-
3113
- repo: https://github.com/pre-commit/pre-commit-hooks
3214
rev: v4.5.0
3315
hooks:
@@ -40,12 +22,12 @@ repos:
4022
- id: trailing-whitespace
4123

4224
- repo: https://github.com/tox-dev/pyproject-fmt
43-
rev: 1.5.3
25+
rev: 1.7.0
4426
hooks:
4527
- id: pyproject-fmt
4628

4729
- repo: https://github.com/abravalheri/validate-pyproject
48-
rev: v0.15
30+
rev: v0.16
4931
hooks:
5032
- id: validate-pyproject
5133

@@ -55,7 +37,7 @@ repos:
5537
- id: tox-ini-fmt
5638

5739
- repo: https://github.com/pre-commit/mirrors-prettier
58-
rev: v3.1.0
40+
rev: v4.0.0-alpha.8
5941
hooks:
6042
- id: prettier
6143
args: [--prose-wrap=always, --print-width=88]

pyproject.toml

+28-3
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,31 @@ version.source = "vcs"
6060
[tool.hatch.version.raw-options]
6161
local_scheme = "no-local-version"
6262

63-
[tool.isort]
64-
add_imports = "from __future__ import annotations"
65-
profile = "black"
63+
[tool.ruff]
64+
fix = true
65+
66+
[tool.ruff.lint]
67+
select = [
68+
"C4", # flake8-comprehensions
69+
"E", # pycodestyle errors
70+
"EM", # flake8-errmsg
71+
"F", # pyflakes errors
72+
"I", # isort
73+
"ISC", # flake8-implicit-str-concat
74+
"LOG", # flake8-logging
75+
"PGH", # pygrep-hooks
76+
"RUF100", # unused noqa (yesqa)
77+
"UP", # pyupgrade
78+
"W", # pycodestyle warnings
79+
"YTT", # flake8-2020
80+
]
81+
extend-ignore = [
82+
"E203", # Whitespace before ':'
83+
"E221", # Multiple spaces before operator
84+
"E226", # Missing whitespace around arithmetic operator
85+
"E241", # Multiple spaces after ','
86+
]
87+
88+
[tool.ruff.lint.isort]
89+
known-first-party = ["stravavis"]
90+
required-imports = ["from __future__ import annotations"]

0 commit comments

Comments
 (0)