-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
bugmypy got something wrongmypy got something wrong
Description
import os
from typing import Callable, TypeVar
T = TypeVar("T")
def auto_chmod(func: Callable[..., T], arg: str) -> T:
if func == os.remove:
return func(arg)
raise
Regression introduced in #20492
Only shows up in real world code in #20602 , which looks something like this:
import os
from typing import Callable, TypeVar
T = TypeVar("T")
def auto_chmod(func: Callable[..., T], arg: str) -> T:
if func in [os.unlink, os.remove]:
return func(arg)
raise
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrong