Skip to content

Commit 1890260

Browse files
committed
fixed!
1 parent 49d316e commit 1890260

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

.pre-commit-config.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,16 @@ repos:
3030
rev: v1.1.1
3131
hooks:
3232
- id: mypy
33-
args: ["--config-file=pyproject.toml", "--namespace-packages", "--explicit-package-bases"]
3433
additional_dependencies: [
35-
"pandas-stubs",
36-
"types-pillow",
37-
"types-python-dateutil",
38-
"types-psutil",
39-
"types-docutils",
40-
"types-PyYAML"]
34+
pandas-stubs,
35+
types-pillow,
36+
types-python-dateutil,
37+
types-psutil,
38+
types-docutils,
39+
types-PyYAML]
40+
args: ["--config-file=pyproject.toml",
41+
"lib/matplotlib"]
42+
pass_filenames: false
4143
- repo: https://github.com/pycqa/flake8
4244
rev: 6.0.0
4345
hooks:

pyproject.toml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,20 +136,24 @@ convention = "numpy"
136136
"galleries/users_explain/text/text_props.py" = ["E501"]
137137

138138
[tool.mypy]
139-
mypy_path = 'lib/matplotlib/'
140-
files = 'lib/matplotlib/**'
139+
ignore_missing_imports = true
140+
enable_incomplete_feature = [
141+
"Unpack",
142+
]
141143
exclude = [
142144
".*/matplotlib/(sphinxext|backends|testing/jpl_units)",
143145
".*/mpl_toolkits",
144-
".lib/matplotlib/typing.py",
145146
# tinypages is used for testing the sphinx ext,
146147
# stubtest will import and run, opening a figure if not excluded
147148
".*/tinypages",
149+
"galleries/",
150+
"lib/matplotlib/backends/",
151+
"lib/matplotlib/testing/jpl_units",
152+
"lib/mpl_toolkits/",
153+
"lib/matplotlib/tests/",
154+
"doc/sphinxext/"
148155
]
149-
ignore_missing_imports = true
150-
enable_incomplete_feature = [
151-
"Unpack",
152-
]
156+
153157

154158
[tool.rstcheck]
155159
ignore_directives = [

0 commit comments

Comments
 (0)