Skip to content

Commit e17580a

Browse files
committed
fix mypy errors and work around python/mypy#11852
1 parent 860e29e commit e17580a

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

git_code_debt/generate.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ def load_data(
155155
itertools.repeat(metric_parsers),
156156
itertools.repeat(exclude),
157157
)
158-
with mapper(jobs) as do_map:
158+
# https://github.com/python/mypy/issues/11852
159+
with mapper(jobs) as do_map: # type: ignore
159160
for commit, metrics in zip(
160161
commits, do_map(_get_metrics_inner, mp_args),
161162
):

git_code_debt/util/discovery.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ class is to be included in the output.
2121
matched_classes = set()
2222

2323
for _, module_name, _ in pkgutil.walk_packages(
24-
# https://github.com/python/mypy/issues/1422
25-
package.__path__, # type: ignore
24+
package.__path__,
2625
prefix=package.__name__ + '.',
2726
):
2827
module = __import__(module_name, fromlist=['__trash'], level=0)

tests/generate_test.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ def square(x):
6161

6262
@pytest.mark.parametrize('jobs', (1, 4))
6363
def test_mapper(jobs):
64-
with mapper(jobs) as do_map:
64+
# https://github.com/python/mypy/issues/11852
65+
with mapper(jobs) as do_map: # type: ignore
6566
ret = tuple(do_map(square, (3, 5, 9)))
6667
assert ret == (9, 25, 81)
6768

0 commit comments

Comments
 (0)