Skip to content

Commit

Permalink
fix mypy error with Mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammed-ali-1 committed Nov 21, 2023
1 parent bc7da59 commit bb9d83e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion python_tool_competition_2024/calculation/cli_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def _run_command(config: Config, command: _COMMAND, args: tuple[str, ...]) -> st
raise CommandFailedError((command, *args))


def _extend_env(config: Config) -> Mapping[str, str]:
def _extend_env(config: Config) -> dict[str, str]:
env = os.environ | {
"PYTHONPATH": os.pathsep.join(
(str(config.targets_dir), str(config.results_dir))
Expand Down
4 changes: 1 addition & 3 deletions tests/calculation/test_cli_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@ def test_invalid_command(capsys: pytest.CaptureFixture[str], *, verbose: bool) -
({"SOME": "test"}, {"SOME": "test"}),
),
)
def test_extend_env(
original_env: Mapping[str, str], expected_env: Mapping[str, str]
) -> None:
def test_extend_env(original_env: dict[str, str], expected_env: dict[str, str]) -> None:
config_mock = sealed_mock(
targets_dir=Path("targets", "path"), results_dir=Path("some", "results", "path")
)
Expand Down

0 comments on commit bb9d83e

Please sign in to comment.