Fix generator issues for typing

This commit is contained in:
Dave Halter
2019-06-08 01:50:38 +02:00
parent 26951f5c18
commit eef02e5c56
4 changed files with 13 additions and 4 deletions

View File

@@ -575,5 +575,11 @@ _implemented = {
# Not sure if this is necessary, but it's used a lot in typeshed and
# it's for now easier to just pass the function.
'abstractmethod': _return_first_param,
}
},
'typing': {
# The _alias function just leads to some annoying type inference.
# Therefore, just make it return nothing, which leads to the stubs
# being used instead. This only matters for 3.7+.
'_alias': lambda obj, arguments: NO_CONTEXTS,
},
}