Fix mypy error at maths (#4613)

* Fix mypy errors for maths/greedy_coin_change.py

* Fix mypy errors for maths/two_sum.py

* Fix mypy errors for maths/triplet_sum.py

* Fix the format of maths/greedy_coin_change.py

* Fix the format of maths/greedy_coin_change.py

* Fix format with pre-commit
This commit is contained in:
imp
2021-08-16 03:15:53 +08:00
committed by GitHub
parent 032999f36e
commit d009cea391
3 changed files with 4 additions and 4 deletions

View File

@@ -31,7 +31,7 @@ def two_sum(nums: list[int], target: int) -> list[int]:
>>> two_sum([3 * i for i in range(10)], 19)
[]
"""
chk_map = {}
chk_map: dict[int, int] = {}
for index, val in enumerate(nums):
compl = target - val
if compl in chk_map: