Skip to content

Allow callables in _SourceObjectType (Python 2)#3338

Merged
JelleZijlstra merged 1 commit intopython:masterfrom
The-Compiler:patch-1
Oct 11, 2019
Merged

Allow callables in _SourceObjectType (Python 2)#3338
JelleZijlstra merged 1 commit intopython:masterfrom
The-Compiler:patch-1

Conversation

@The-Compiler
Copy link
Contributor

This is important because mypy doesn't generally think functions are compatible with FunctionType, so inspect.getsource on arbitrary functions is rejected by the current annotations.

This is a port of #3295 to the Python 2 version of inspect.pyi - thanks @JelleZijlstra for the original PR!

This is important because mypy doesn't generally think functions are compatible with `FunctionType`, so `inspect.getsource` on arbitrary functions is rejected by the current annotations.
@JelleZijlstra JelleZijlstra merged commit 9b09221 into python:master Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants