From 4575e9c78bea5b61408cf47a3ed0d072580f49c7 Mon Sep 17 00:00:00 2001 From: Sean Breckenridge Date: Wed, 26 Jan 2022 17:07:53 -0800 Subject: [PATCH] Revert "ci: ignore mismatched pos-only args on mypy 3.9" This reverts commit 7a63838d3b29242fd64bcc597ab7e52b9c3e8fda. --- my/core/common.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/my/core/common.py b/my/core/common.py index 2b52385..96ab44c 100644 --- a/my/core/common.py +++ b/my/core/common.py @@ -599,7 +599,6 @@ def assert_subpackage(name: str) -> None: # NOTE: if we use overlay, name can be smth like my.origg.my.core.cachew ... assert name == '__main__' or 'my.core' in name, f'Expected module __name__ ({name}) to be __main__ or start with my.core' -_T = TypeVar("_T") # https://stackoverflow.com/a/10436851/706389 from concurrent.futures import Future, Executor @@ -608,11 +607,7 @@ class DummyExecutor(Executor): self._shutdown = False self._max_workers = max_workers - - # TODO: once support for 3.7 is dropped, - # can make 'fn' a positional only parameter, - # which fixes the mypy error this throws without the type: ignore - def submit(self, fn: Callable[..., _T], *args: Any, **kwargs: Any) -> Future[_T]: # type: ignore[override] + def submit(self, fn, *args, **kwargs) -> Future: if self._shutdown: raise RuntimeError('cannot schedule new futures after shutdown') @@ -628,5 +623,5 @@ class DummyExecutor(Executor): return f - def shutdown(self, wait: bool=True) -> None: # type: ignore[override] + def shutdown(self, wait: bool=True) -> None: self._shutdown = True