Skip to content

Instantly share code, notes, and snippets.

@luochen1990
Created August 11, 2024 14:57
Show Gist options
  • Save luochen1990/fa00e46474fc739299acfc41b50dad42 to your computer and use it in GitHub Desktop.
Save luochen1990/fa00e46474fc739299acfc41b50dad42 to your computer and use it in GitHub Desktop.
Pylance typing issue MRE
def f(x: int):
return x + 1
a: int = "abc"
f(a)
def g():
from collections import namedtuple
tupt = namedtuple("Foo", 'x')
tup = tupt(1)
return tup.x
b: int = g()
f(b)
@luochen1990
Copy link
Author

image

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