Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update config #64

Merged
merged 4 commits into from
Nov 19, 2023
Merged
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
14 changes: 7 additions & 7 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
pull_request_rules:
# pre-commit ci won't automerge (see https://github.com/pre-commit-ci/issues/issues/48)
- name: automatic merge for pre-commit ci updates
conditions:
- author=pre-commit-ci[bot]
- title=[pre-commit.ci] pre-commit autoupdate
actions:
merge:
method: squash
- name: automatic merge for pre-commit ci updates
conditions:
- author=pre-commit-ci[bot]
- title=[pre-commit.ci] pre-commit autoupdate
actions:
merge:
method: squash
75 changes: 40 additions & 35 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,41 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-docstring-first
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: name-tests-test
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.5.0
hooks:
- id: setup-cfg-fmt
args: ['--min-py-version', '3.8']
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.12.0
hooks:
- id: reorder-python-imports
args: [--py38-plus, --add-import, 'from __future__ import annotations']
- repo: https://github.com/mxr/unkey
rev: v0.0.1
hooks:
- id: unkey
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.5
hooks:
- id: ruff
args: ['--fix', '--target-version=py38']
- id: ruff-format
args: ['--target-version=py38']
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.0
hooks:
- id: mypy
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-docstring-first
- id: debug-statements
- id: end-of-file-fixer
- id: name-tests-test
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.11.0
hooks:
- id: pretty-format-toml
args: [--autofix]
- id: pretty-format-yaml
args: [--autofix]
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.5.0
hooks:
- id: setup-cfg-fmt
args: [--min-py-version, '3.8']
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.12.0
hooks:
- id: reorder-python-imports
args: [--py38-plus, --add-import, from __future__ import annotations]
- repo: https://github.com/mxr/unkey
rev: v0.0.1
hooks:
- id: unkey
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.5
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.0
hooks:
- id: mypy
23 changes: 23 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[tool.mypy]
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
no_implicit_optional = true

[[tool.mypy.overrides]]
disallow_untyped_defs = false
module = ["testing.*", "tests.*"]

[tool.ruff]
target-version = "py38"

[tool.ruff.lint]
extend-select = [
"UP", # see pyupgrade
"B", # see flake8-bugbear
"A", # see flake8-builtins
"C4", # see flake8-comprehension
"SIM", # see flake8-simplify
"TCH" # see flake8-type-checking
]
13 changes: 0 additions & 13 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,3 @@ universal = True

[coverage:run]
plugins = covdefaults

[mypy]
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
no_implicit_optional = true

[mypy-testing.*]
disallow_untyped_defs = false

[mypy-tests.*]
disallow_untyped_defs = false