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
{{ message }}
Repository navigation
Use correct line for # type: ignore's in typeshed #2623
In python/typed_ast#61 I am aiming to backport a fix to a longstanding bug in the ast module that sets decorated nodes line numbers incorrectly. After typed_ast is updated, I was hoping to move the type ignores in typeshed to the correct line numbers (the line of the def or class keywords). I believe @rchen152 has said that pytype will not be affected by this, but I wanted to check with the pyre team (@dkgi are you a good person to mention for these things?) and anyone else who may be interested.
Basically the changes would look like changing
@foo # type: ignore
def bar:
...
to
@foo
def bar: # type: ignore
...
and similar changes.
If this presents a problem, we could likely put # type: ignores on both lines for a time, but I'd prefer not to need to do that.
If you move the ignores at once, you'll have to coordinate changes to typed_ast and typeshed (and possibly mypy), or CI will break in various places. It's probably easier to duplicate the ignores first, then remove them once there's a new typed-ast release.
Activity
JelleZijlstra commentedon Nov 23, 2018
If you move the ignores at once, you'll have to coordinate changes to typed_ast and typeshed (and possibly mypy), or CI will break in various places. It's probably easier to duplicate the ignores first, then remove them once there's a new typed-ast release.
emmatyping commentedon Nov 23, 2018
Hm, that is a good point. I suppose I will have to put in both, at least for a time.
emmatyping commentedon Jan 25, 2020
I believe this is no longer an issue.