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

fix: mypy update #606

Merged
merged 2 commits into from
Apr 24, 2023
Merged
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ test = [
]
typing = [
"importlib-metadata >= 5.1",
"mypy == 0.991",
"mypy == 1.2.0",
"tomli",
"typing-extensions >= 3.7.4.3",
]
Expand Down
2 changes: 1 addition & 1 deletion src/build/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def check_dependency(
return

try:
dist = importlib_metadata.distribution(req.name) # type: ignore[no-untyped-call]
dist = importlib_metadata.distribution(req.name)
except importlib_metadata.PackageNotFoundError:
# dependency is not installed in the environment.
yield (*ancestral_req_strings, normalised_req_string)
Expand Down
2 changes: 1 addition & 1 deletion src/build/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def _create_isolated_env_venv(path: str) -> tuple[str, str]:
executable, script_dir, purelib = _find_executable_and_scripts(path)

# Get the version of pip in the environment
pip_distribution = next(iter(metadata.distributions(name='pip', path=[purelib]))) # type: ignore[no-untyped-call]
pip_distribution = next(iter(metadata.distributions(name='pip', path=[purelib])))
current_pip_version = packaging.version.Version(pip_distribution.version)

if platform.system() == 'Darwin' and int(platform.mac_ver()[0].split('.')[0]) >= 11:
Expand Down
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ commands_pre =
[testenv:type]
description = run type check on code base
extras = typing
setenv =
PYTHONWARNDEFAULTENCODING =
commands =
mypy

Expand Down