Skip to content

Commit

Permalink
MyPy: fix errors with latest versions of MyPy
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitriPapadopoulos committed Aug 4, 2024
1 parent a938c1e commit 239b84a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion backend/src/hatchling/cli/dep/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,4 @@ def dependencies_in_sync(
environment = default_environment()

installed_distributions = DistributionCache(sys_path)
return all(dependency_in_sync(requirement, environment, installed_distributions) for requirement in requirements)
return all(dependency_in_sync(requirement, environment, installed_distributions) for requirement in requirements) # type: ignore[arg-type]
2 changes: 1 addition & 1 deletion backend/src/hatchling/metadata/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def project_metadata_from_core_metadata(core_metadata: str) -> dict[str, Any]:
header_registry = HeaderRegistry()

message = email.message_from_string(core_metadata)
metadata = {}
metadata: dict[str, Any] = {}

if name := message.get('Name'):
metadata['name'] = name
Expand Down
4 changes: 2 additions & 2 deletions src/hatch/cli/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def __init__(
is_interactive: bool,
verbosity: int,
spinner_style: str,
waiting_style: Style,
success_style: Style,
waiting_style: Style | str,
success_style: Style | str,
initializer: Callable,
finalizer: Callable,
):
Expand Down
3 changes: 2 additions & 1 deletion src/hatch/dep/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,5 @@ def dependencies_in_sync(
environment = default_environment()

installed_distributions = DistributionCache(sys_path)
return all(dependency_in_sync(requirement, environment, installed_distributions) for requirement in requirements)
return all(dependency_in_sync(requirement, environment, installed_distributions) for requirement in requirements) # type: ignore[arg-type]

0 comments on commit 239b84a

Please sign in to comment.