Skip to content

Instantly share code, notes, and snippets.

@mitsuse
Created March 10, 2021 07:46
Show Gist options
  • Save mitsuse/e6f36e284c2cfed32233d118a17ec004 to your computer and use it in GitHub Desktop.
Save mitsuse/e6f36e284c2cfed32233d118a17ec004 to your computer and use it in GitHub Desktop.
Argument 1 to "f" has incompatible type "object"; expected "Type[Any]"
from typing import List
from typing import Tuple
from typing import Type
def f(x: Type) -> None:
...
# error: Argument 1 to "f" has incompatible type "object"; expected "Type[Any]"
# f(Tuple[int, ...])
# OK
f(List[int])
@mitsuse
Copy link
Author

mitsuse commented Mar 10, 2021

mypy 0.812

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment