Skip to content
Draft
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
76 changes: 46 additions & 30 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,4 @@
repos:
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/asottile/yesqa
rev: v1.5.0
hooks:
- id: yesqa
- repo: https://github.com/asottile/pyupgrade
rev: v3.8.0
hooks:
- id: pyupgrade
args: ['--py38-plus']
- repo: https://github.com/ambv/black
rev: 23.3.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
Expand All @@ -36,12 +15,6 @@ repos:
- id: name-tests-test
args: ['--django']
- id: check-json
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
- id: codespell
exclude_types: [json]
exclude: ^tests/mock-+
- repo: https://github.com/marco-c/taskcluster_yml_validator
rev: v0.0.10
hooks:
Expand All @@ -55,19 +28,62 @@ repos:
- id: check-useless-excludes
- repo: local
hooks:
- id: isort
name: isort
entry: tox -e poetry -- isort --filter-files
language: system
require_serial: true
types_or: [cython, pyi, python]
- id: yesqa
name: yesqa
entry: tox -e poetry -- yesqa
language: system
require_serial: true
types: [python]
- id: pyupgrade
name: pyupgrade
entry: tox -e poetry -- pyupgrade --py38-plus
language: system
require_serial: true
types: [python]
- id: black
name: black
entry: tox -e poetry -- black
language: system
require_serial: true
types_or: [pyi, python]
- id: flake8
name: flake8
entry: tox -e poetry -- flake8
language: system
require_serial: true
types: [python]
- id: codespell
name: codespell
entry: tox -e poetry -- codespell
language: system
require_serial: true
types: [text]
exclude_types: [json]
exclude: ^(tests/mock-+|poetry.lock)
- id: mypy
name: mypy
entry: tox -e mypy --
entry: tox -e poetry -- mypy --install-types --non-interactive
language: system
require_serial: true
exclude: ^tests/
types: [python]
types_or: [pyi, python]
- id: pylint
name: pylint
entry: tox -e pylint --
entry: tox -e poetry -- pylint
language: system
require_serial: true
types: [python]
- id: toml-sort
name: toml-sort
entry: tox -e poetry -- toml-sort
files: "^pyproject\\.toml$"
language: system

default_language_version:
python: python3
21 changes: 7 additions & 14 deletions .taskcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ tasks:
script:
- bash
- '-xec'
- tox; tox -e codecov
- tox; tox -e poetry -- codecov
jobs:
include:
- name: tests python 3.8
Expand All @@ -38,27 +38,20 @@ tasks:
TOXENV: py311
- name: lint python 3.11
version: "3.11"
env:
TOXENV: lint
script:
- tox
script: [pre-commit, run, -a]
- name: build python 3.11
version: "3.11"
script: [tox, -e, build]
- name: PyPI upload
version: "3.11"
env:
TOXENV: pypi
script:
- tox
script: [tox, -e, pypi]
when:
release: true
all_passed: true
secrets:
- type: env
secret: project/fuzzing/pypi-fuzzfetch
name: TWINE_USERNAME
key: username
- type: env
secret: project/fuzzing/pypi-fuzzfetch
name: TWINE_PASSWORD
name: POETRY_PYPI_TOKEN_PYPI
key: password

# Filter github event to only necessary fields.
Expand Down
Loading