Open jakebailey opened 4 years ago
When building the overload, it tries to look up _P
, but with the new typeshed, _P
doesn't exist in the global scope. On master, it is in the global scope.
Change:
_P = TypeVar('_P', bound=PurePath)
To:
_P = TypeVar('_P', bound='PurePath')
And it works. I'm not sure that this should be legal, as PEP 484 says that forward references need to be wrapped in quotes, and we assume this behavior...
Filed https://github.com/python/typeshed/issues/3334. Worst case I can pin to something before that change, but typeshed hasn't yet fully updated to 3.8's new stuff yet as far as I can tell.
Handling the assignment of _P
, it goes and tries to evaluate the TypeVar call, which then makes its way down to handling the evaluation of PurePath
Can be fixed by skipping the extra eval in GetValueFromName if the module being analyzed is a stub. Better fixed by using lazy references (future).
After upgrading typeshed to a newer version, the GenericPath test fails. It looks like the
__truediv__
function on Path/PurePath/etc do not have their return values set correctly. The code added in #1463 doesn't even execute.Split from #1371, since this is taking a good chunk of time investigating.