Skip to content

Commit 5caea3b

Browse files
Switch to poetry but with a single dev group for lint/test dependencies.
1 parent ce9e948 commit 5caea3b

File tree

5 files changed

+303
-138
lines changed

5 files changed

+303
-138
lines changed

.pre-commit-config.yaml

Lines changed: 46 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,4 @@
11
repos:
2-
- repo: https://github.com/pycqa/isort
3-
rev: 5.12.0
4-
hooks:
5-
- id: isort
6-
- repo: https://github.com/asottile/yesqa
7-
rev: v1.5.0
8-
hooks:
9-
- id: yesqa
10-
- repo: https://github.com/asottile/pyupgrade
11-
rev: v3.8.0
12-
hooks:
13-
- id: pyupgrade
14-
args: ['--py38-plus']
15-
- repo: https://github.com/ambv/black
16-
rev: 23.3.0
17-
hooks:
18-
- id: black
19-
- repo: https://github.com/pycqa/flake8
20-
rev: 6.0.0
21-
hooks:
22-
- id: flake8
232
- repo: https://github.com/pre-commit/pre-commit-hooks
243
rev: v4.4.0
254
hooks:
@@ -36,12 +15,6 @@ repos:
3615
- id: name-tests-test
3716
args: ['--django']
3817
- id: check-json
39-
- repo: https://github.com/codespell-project/codespell
40-
rev: v2.2.5
41-
hooks:
42-
- id: codespell
43-
exclude_types: [json]
44-
exclude: ^(tests/mock-+|poetry.lock)
4518
- repo: https://github.com/marco-c/taskcluster_yml_validator
4619
rev: v0.0.10
4720
hooks:
@@ -55,19 +28,62 @@ repos:
5528
- id: check-useless-excludes
5629
- repo: local
5730
hooks:
31+
- id: isort
32+
name: isort
33+
entry: tox -e poetry -- isort --filter-files
34+
language: system
35+
require_serial: true
36+
types_or: [cython, pyi, python]
37+
- id: yesqa
38+
name: yesqa
39+
entry: tox -e poetry -- yesqa
40+
language: system
41+
require_serial: true
42+
types: [python]
43+
- id: pyupgrade
44+
name: pyupgrade
45+
entry: tox -e poetry -- pyupgrade --py38-plus
46+
language: system
47+
require_serial: true
48+
types: [python]
49+
- id: black
50+
name: black
51+
entry: tox -e poetry -- black
52+
language: system
53+
require_serial: true
54+
types_or: [pyi, python]
55+
- id: flake8
56+
name: flake8
57+
entry: tox -e poetry -- flake8
58+
language: system
59+
require_serial: true
60+
types: [python]
61+
- id: codespell
62+
name: codespell
63+
entry: tox -e poetry -- codespell
64+
language: system
65+
require_serial: true
66+
types: [text]
67+
exclude_types: [json]
68+
exclude: ^(tests/mock-+|poetry.lock)
5869
- id: mypy
5970
name: mypy
60-
entry: tox -e mypy --
71+
entry: tox -e poetry -- mypy --install-types --non-interactive
6172
language: system
6273
require_serial: true
6374
exclude: ^tests/
64-
types: [python]
75+
types_or: [pyi, python]
6576
- id: pylint
6677
name: pylint
67-
entry: tox -e pylint --
78+
entry: tox -e poetry -- pylint
6879
language: system
6980
require_serial: true
7081
types: [python]
82+
- id: toml-sort
83+
name: toml-sort
84+
entry: tox -e poetry -- toml-sort
85+
files: "^pyproject\\.toml$"
86+
language: system
7187

7288
default_language_version:
7389
python: python3

.taskcluster.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ tasks:
1717
script:
1818
- bash
1919
- '-xec'
20-
- tox; tox -e codecov
20+
- tox; tox -e poetry -- codecov
2121
jobs:
2222
include:
2323
- name: tests python 3.8
@@ -38,22 +38,13 @@ tasks:
3838
TOXENV: py311
3939
- name: lint python 3.11
4040
version: "3.11"
41-
env:
42-
TOXENV: lint
43-
script:
44-
- tox
41+
script: [pre-commit, run, -a]
4542
- name: build python 3.11
4643
version: "3.11"
47-
env:
48-
TOXENV: build
49-
script:
50-
- tox
44+
script: [tox, -e, build]
5145
- name: PyPI upload
5246
version: "3.11"
53-
env:
54-
TOXENV: pypi
55-
script:
56-
- tox
47+
script: [tox, -e, pypi]
5748
when:
5849
release: true
5950
all_passed: true

0 commit comments

Comments
 (0)