diff --git a/pre_commit/xargs.py b/pre_commit/xargs.py index 9a397234..6b0fa208 100644 --- a/pre_commit/xargs.py +++ b/pre_commit/xargs.py @@ -159,8 +159,7 @@ def xargs( ) threads = min(len(partitions), target_concurrency) - # https://github.com/python/mypy/issues/11852 - with _thread_mapper(threads) as thread_map: # type: ignore + with _thread_mapper(threads) as thread_map: results = thread_map(run_cmd_partition, partitions) for proc_retcode, proc_out, _ in results: diff --git a/tests/xargs_test.py b/tests/xargs_test.py index 80bcd268..7e83ef59 100644 --- a/tests/xargs_test.py +++ b/tests/xargs_test.py @@ -166,15 +166,13 @@ def test_xargs_concurrency(): def test_thread_mapper_concurrency_uses_threadpoolexecutor_map(): - # https://github.com/python/mypy/issues/11852 - with xargs._thread_mapper(10) as thread_map: # type: ignore + with xargs._thread_mapper(10) as thread_map: _self = thread_map.__self__ # type: ignore assert isinstance(_self, concurrent.futures.ThreadPoolExecutor) def test_thread_mapper_concurrency_uses_regular_map(): - # https://github.com/python/mypy/issues/11852 - with xargs._thread_mapper(1) as thread_map: # type: ignore + with xargs._thread_mapper(1) as thread_map: assert thread_map is map