-
-
Notifications
You must be signed in to change notification settings - Fork 54
Support text appearing after "# type: ignore" #116
Conversation
Failure is because we still do 3.4 windows builds so I'm gonna put up a PR to turn those off and then rebase this |
This is to allow things like `# type: ignore[E1000]`. Essentially a backport of GH-13238, GH-13479, and GH-13504 from cpython.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the backport!
Btw, when the next release of typed_ast
is planned?
Whoops, I missed this somehow. It'll take some time to review carefully. Maybe we can do another typed_ast release after this has landed? The release process is pretty straightforward and there are working instructions in in release_process.md. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All LGTM. Have you at least manually checked ast27? IIRC the tests only run for ast3.
The tests live in the |
This is to support allowing typecheckers to implement ignores for specific errors, using syntax like `# type: ignore=E1000` or `# type: ignore[type-mismatch` or some such. mypy is about to add support for ignoring specific errors following this design: python/mypy#7239 Support for extra text in type comments was implemented in CPython as https://bugs.python.org/issue36878 and in typed_ast as python/typed_ast#116.
This is to support allowing typecheckers to implement ignores for specific errors, using syntax like `# type: ignore=E1000` or `# type: ignore[type-mismatch` or some such. mypy is about to add support for ignoring specific errors following this design: python/mypy#7239 Support for extra text in type comments was implemented in CPython as https://bugs.python.org/issue36878 and in typed_ast as python/typed_ast#116.
This is to support allowing typecheckers to implement ignores for specific errors, using syntax like `# type: ignore=E1000` or `# type: ignore[type-mismatch` or some such. mypy is about to add support for ignoring specific errors following this design: python/mypy#7239 Support for extra text in type comments was implemented in CPython as https://bugs.python.org/issue36878 and in typed_ast as python/typed_ast#116.
* In PEP 484 type comments, allow text after "# type: ignore" This is to support allowing typecheckers to implement ignores for specific errors, using syntax like `# type: ignore=E1000` or `# type: ignore[type-mismatch` or some such. mypy is about to add support for ignoring specific errors following this design: python/mypy#7239 Support for extra text in type comments was implemented in CPython as https://bugs.python.org/issue36878 and in typed_ast as python/typed_ast#116. * add test back
This is to allow things like
# type: ignore[E1000]
.Essentially a backport of GH-13238, GH-13479, and GH-13504 from cpython.