I feel this is a nicer solution. Forward Reference busting should be part of the annotation resolving. It doesn not have anything to do with the typing module (and should indeed also happen if someone writes his own types outside of the typing module)

This commit is contained in:
Claude
2015-12-30 23:05:01 +01:00
parent 5948c63cf9
commit 10f5e15325
2 changed files with 28 additions and 26 deletions

View File

@@ -153,7 +153,3 @@ def function_with_assined_class_in_reference(x: X, y: "Y"):
#? int()
y
Y = int
def just_because_we_can(x: "flo" + "at"):
#? float()
x