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

Pass mypy and link issues #113

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
22 changes: 22 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,25 @@ explicit_package_bases = True
disable_error_code =
# Disable due to many false positives
overload-overlap,

# jaraco/jaraco.env#2
# jaraco/jaraco.env#3
[mypy-jaraco.env]
ignore_missing_imports = True

# jaraco/jaraco.path#2
[mypy-jaraco.path]
ignore_missing_imports = True

# jaraco/jaraco.text#17
[mypy-jaraco.text]
ignore_missing_imports = True

# Tries to install grcpio which does not build. Only used for an example anyway
[mypy-pydragon]
ignore_missing_imports = True

# jaraco/jaraco.develop#20
# Lucretiel/autocommand#38
[mypy-autocommand.*]
ignore_missing_imports = True
2 changes: 1 addition & 1 deletion pip_run/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import contextlib
import pathlib

from jaraco import env # type: ignore # (python/mypy#15970)
import jaraco.env as env
from jaraco.context import suppress
from jaraco.functools import bypass_when
from more_itertools import locate, split_at
Expand Down
10 changes: 6 additions & 4 deletions pip_run/compat/py310.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
Compatibility for Python 3.10 and earlier.
"""

import sys

__all__ = ['tomllib']


try:
import tomllib # type: ignore
except ImportError: # pragma: no cover
import tomli as tomllib # type: ignore
if sys.version_info >= (3, 11):
import tomllib
else:
import tomli as tomllib
12 changes: 4 additions & 8 deletions pip_run/compat/py38.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
str if sys.version_info < (3, 9) and platform.system() == 'Windows' else identity
)


try:
from importlib.resources import files # type: ignore
except ImportError: # pragma: no cover
from importlib_resources import files # type: ignore


files = files
if sys.version_info >= (3, 9):
from importlib.resources import files as files
else: # pragma: no cover
from importlib_resources import files as files
4 changes: 2 additions & 2 deletions pip_run/read-deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def separator(input) -> str:
@autocommand.autocommand(__name__)
def run(
script: path.ExtantFile,
separator: separator = ' ', # type: ignore
separator: separator = ' ', # type: ignore[valid-type]
):
"""
>>> run(['examples/test-mongodb-covered-query.py'])
Expand All @@ -30,5 +30,5 @@ def run(
pytest
jaraco.mongodb>=3.10
"""
joiner = separator.join # type: ignore
joiner = separator.join # type: ignore[attr-defined]
print(joiner(DepsReader.try_read(pathlib.Path(script)).params()))
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ type = [
"pytest-mypy",

# local
"cowsay",
]


Expand All @@ -100,7 +101,3 @@ namespaces = true


[tool.setuptools_scm]


[tool.pytest-enabler.mypy]
# Disabled due to jaraco/skeleton#143
Loading