You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this belongs rather to stubgen (maintained here), or to PyAnnotate (in a separate repo), rather than to mypy itself. Otherwise such feature might have some weird action at a distance. Also explicit is better than implicit.
Dear mypy developers,
I am looking for feedback for this little idea:
https://github.com/guettli/python-name2type-mapping
Please tell me what you think.
Python name2type mapping
In October 2018 on the mailing list python-ideas some developers encouraged me, that the idea of a name2type mapping would be usefull.
Goal:
This is not the goal:
Syntax Proposal
The name2type mapping is defined in the docstring of a Python file.
The general syntax is "name2type:" followed by a comma sperated list of variable names. Then ":", then the type hint.
Examples::
If the docstring is in a file called
__init__.py
, then the type hints get specified for all files below this directory (recursively).The text was updated successfully, but these errors were encountered: