Skip to content

Commit 3a65398

Browse files
authored
Merge pull request #113 from Avasam/Pass-mypy-and-link-issues
Pass mypy and link issues
2 parents 9d5010f + db2372a commit 3a65398

File tree

6 files changed

+36
-19
lines changed

6 files changed

+36
-19
lines changed

mypy.ini

+22
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,25 @@ explicit_package_bases = True
1313
disable_error_code =
1414
# Disable due to many false positives
1515
overload-overlap,
16+
17+
# jaraco/jaraco.env#2
18+
# jaraco/jaraco.env#3
19+
[mypy-jaraco.env]
20+
ignore_missing_imports = True
21+
22+
# jaraco/jaraco.path#2
23+
[mypy-jaraco.path]
24+
ignore_missing_imports = True
25+
26+
# jaraco/jaraco.text#17
27+
[mypy-jaraco.text]
28+
ignore_missing_imports = True
29+
30+
# Tries to install grcpio which does not build. Only used for an example anyway
31+
[mypy-pydragon]
32+
ignore_missing_imports = True
33+
34+
# jaraco/jaraco.develop#20
35+
# Lucretiel/autocommand#38
36+
[mypy-autocommand.*]
37+
ignore_missing_imports = True

pip_run/commands.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import contextlib
33
import pathlib
44

5-
from jaraco import env # type: ignore # (python/mypy#15970)
5+
from jaraco import env # type: ignore[attr-defined] # (python/mypy#10360)
66
from jaraco.context import suppress
77
from jaraco.functools import bypass_when
88
from more_itertools import locate, split_at

pip_run/compat/py310.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
Compatibility for Python 3.10 and earlier.
33
"""
44

5+
import sys
6+
57
__all__ = ['tomllib']
68

79

8-
try:
9-
import tomllib # type: ignore
10-
except ImportError: # pragma: no cover
11-
import tomli as tomllib # type: ignore
10+
if sys.version_info >= (3, 11):
11+
import tomllib
12+
else: # pragma: no cover
13+
import tomli as tomllib

pip_run/compat/py38.py

+4-8
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@
77
str if sys.version_info < (3, 9) and platform.system() == 'Windows' else identity
88
)
99

10-
11-
try:
12-
from importlib.resources import files # type: ignore
13-
except ImportError: # pragma: no cover
14-
from importlib_resources import files # type: ignore
15-
16-
17-
files = files
10+
if sys.version_info >= (3, 9):
11+
from importlib.resources import files as files
12+
else: # pragma: no cover
13+
from importlib_resources import files as files

pip_run/read-deps.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def separator(input) -> str:
1818
@autocommand.autocommand(__name__)
1919
def run(
2020
script: path.ExtantFile,
21-
separator: separator = ' ', # type: ignore
21+
separator: separator = ' ', # type: ignore[valid-type]
2222
):
2323
"""
2424
>>> run(['examples/test-mongodb-covered-query.py'])
@@ -30,5 +30,5 @@ def run(
3030
pytest
3131
jaraco.mongodb>=3.10
3232
"""
33-
joiner = separator.join # type: ignore
33+
joiner = separator.join # type: ignore[attr-defined]
3434
print(joiner(DepsReader.try_read(pathlib.Path(script)).params()))

pyproject.toml

+1-4
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ type = [
8181
"pytest-mypy",
8282

8383
# local
84+
"cowsay",
8485
]
8586

8687

@@ -100,7 +101,3 @@ namespaces = true
100101

101102

102103
[tool.setuptools_scm]
103-
104-
105-
[tool.pytest-enabler.mypy]
106-
# Disabled due to jaraco/skeleton#143

0 commit comments

Comments
 (0)