-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: pull in CI config from poetry, reformat as needed
- Loading branch information
1 parent
9b64f71
commit 860c569
Showing
4 changed files
with
101 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
[flake8] | ||
max-line-length = 88 | ||
ignore = E501, E203, W503 | ||
min_python_version = 3.6.0 | ||
max-line-length = 120 | ||
ban-relative-imports = true | ||
# flake8-use-fstring: https://github.com/MichaelKim0407/flake8-use-fstring#--percent-greedy-and---format-greedy | ||
format-greedy = 0 | ||
inline-quotes = double | ||
enable-extensions = TC, TC1 | ||
type-checking-exempt-modules = typing, typing-extensions | ||
eradicate-whitelist-extend = ^-.*; | ||
extend-ignore = | ||
# E203: Whitespace before ':' (pycqa/pycodestyle#373) | ||
E203, | ||
# SIM106: Handle error-cases first | ||
SIM106, | ||
# ANN101: Missing type annotation for self in method | ||
ANN101, | ||
# ANN102: Missing type annotation for cls in classmethod | ||
ANN102, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,72 @@ | ||
ci: | ||
autofix_prs: false | ||
|
||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 22.8.0 | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
hooks: | ||
- id: black | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-merge-conflict | ||
- id: check-case-conflict | ||
- id: check-json | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: pretty-format-json | ||
args: [--autofix, --no-ensure-ascii, --no-sort-keys] | ||
- id: check-ast | ||
- id: debug-statements | ||
- id: check-docstring-first | ||
|
||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 5.0.4 | ||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.9.0 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: | ||
- id: python-check-mock-methods | ||
- id: python-use-type-annotations | ||
- id: python-check-blanket-noqa | ||
|
||
- repo: https://github.com/asottile/yesqa | ||
rev: v1.4.0 | ||
hooks: | ||
- id: yesqa | ||
additional_dependencies: &flake8_deps | ||
# - flake8-annotations==2.9.0 | ||
- flake8-broken-line==0.5.0 | ||
- flake8-bugbear==22.7.1 | ||
- flake8-comprehensions==3.10.0 | ||
- flake8-eradicate==1.3.0 | ||
- flake8-quotes==3.3.1 | ||
- flake8-simplify==0.19.3 | ||
- flake8-tidy-imports==4.8.0 | ||
- flake8-type-checking==2.1.2 | ||
- flake8-typing-imports==1.12.0 | ||
- flake8-use-fstring==1.4 | ||
- pep8-naming==0.13.1 | ||
|
||
- repo: https://github.com/PyCQA/isort | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.37.3 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py36-plus] | ||
|
||
- repo: https://github.com/hadialqattan/pycln | ||
rev: v2.1.1 | ||
hooks: | ||
- id: pycln | ||
args: [--all] | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
- repo: https://github.com/psf/black | ||
rev: 22.6.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: debug-statements | ||
- id: pretty-format-json | ||
args: | ||
- --autofix | ||
- id: check-json | ||
- id: black | ||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.34.0 | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: 5.0.4 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py36-plus] | ||
- id: flake8 | ||
additional_dependencies: *flake8_deps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
[tool.isort] | ||
py_version = 36 | ||
profile = "black" | ||
force_single_line = true | ||
atomic = true | ||
lines_after_imports = 2 | ||
combine_as_imports = true | ||
lines_between_types = 1 | ||
filter_files = true | ||
lines_after_imports = 2 | ||
|
||
|
||
[tool.black] | ||
line-length = 88 | ||
include = '\.pyi?$' | ||
target-version = ['py36'] | ||
preview = true |