Skip to content

Commit aa1337e

Browse files
committed
Move exclusions to pyproject
1 parent 78604da commit aa1337e

3 files changed

Lines changed: 24 additions & 7 deletions

File tree

.pre-commit-config.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,17 @@ repos:
1717
entry: isort
1818
language: system
1919
types: [file, python]
20-
exclude: ^doc/_ext/sphinxcontrib.asciinema/.*$
2120

2221
- id: black
2322
name: Black (auto-format)
2423
entry: black
2524
language: system
2625
types: [file, python]
27-
exclude: ^doc/_ext/sphinxcontrib.asciinema/.*$
2826

2927
- id: pylint
3028
name: pylint
3129
entry: pylint
3230
language: system
33-
exclude: ^tests/|^doc/static/uml|conf.py|^doc/_ext/sphinxcontrib.asciinema/
3431
types: [file, python]
3532

3633
# - id: flake8
@@ -105,8 +102,6 @@ repos:
105102
entry: codespell
106103
language: python
107104
types: [text]
108-
exclude: ^doc/_ext/sphinxcontrib.asciinema/.*$
109-
110105
- id: ruff
111106
name: ruff
112107
description: Lint using ruff
@@ -120,7 +115,6 @@ repos:
120115
entry: pyright
121116
language: python
122117
types: [file, python]
123-
exclude: ^doc/_ext/sphinxcontrib.asciinema/.*$
124118
- id: pyupgrade
125119
name: pyupgrade
126120
description: Modernize python

dfetch.code-workspace

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"source.organizeImports": "explicit"
1515
},
1616
"isort.check": true,
17+
"isort.importStrategy": "fromEnvironment",
1718
"restructuredtext.linter.run": "onType",
1819
"restructuredtext.linter.doc8.extraArgs": [
1920
"--config",
@@ -35,6 +36,7 @@
3536
"editor.defaultFormatter": "ms-python.black-formatter",
3637
"editor.formatOnSave": true,
3738
},
39+
"black-formatter.importStrategy": "fromEnvironment",
3840
"editor.renderWhitespace": "all",
3941
"files.trimTrailingWhitespace": true,
4042
},

pyproject.toml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,18 @@ dfetch = ["resources/*.yaml"]
116116
local_scheme = "no-local-version"
117117
version_scheme = "guess-next-dev"
118118

119+
[tool.black]
120+
exclude = '''
121+
/(
122+
doc/_ext/sphinxcontrib_asciinema
123+
)/
124+
'''
125+
119126
[tool.isort]
120127
profile = "black"
128+
skip = [
129+
"doc/_ext/sphinxcontrib_asciinema",
130+
]
121131

122132
# See https://github.com/PyCQA/flake8/issues/234 😢
123133
[tool.flake8]
@@ -143,6 +153,17 @@ max-line-length = 120
143153
disable = "logging-fstring-interpolation"
144154
min-similarity-lines = 10
145155

156+
[tool.pylint.MASTER]
157+
ignore-paths = [
158+
"doc/_build/",
159+
"doc/_ext/sphinxcontrib_asciinema",
160+
"doc/conf.py",
161+
"doc/landing-page/_build/",
162+
"doc/landing-page/conf.py",
163+
"doc/static/uml/",
164+
"tests",
165+
]
166+
146167
[tool.pydocstyle]
147168
convention = "google"
148169

@@ -166,7 +187,7 @@ skip = "*.cast,./venv,**/plantuml-c4/**,./example,.mypy_cache,./doc/_build/**,./
166187
"features/steps/*" = ["F811"]
167188

168189
[tool.pyright]
169-
exclude = ["doc/static/uml/generate_diagram.py"]
190+
exclude = ["doc/static/uml/generate_diagram.py", "./doc/_ext/sphinxcontrib_asciinema/", "./doc/_build"]
170191
standard = ["dfetch", "features"]
171192
reportMissingImports = false
172193
reportMissingModuleSource = false

0 commit comments

Comments
 (0)