[astroid-error] error when checking type comment like 'type: # comment' #7347
Labels
Crash 💥
A bug that makes pylint crash
Needs astroid update
Needs an astroid update (probably a release too) before being mergable
Milestone
Bug description
Checking the following code would lead to an astroid-error:
This is probably due to a bug in astroid.
In astroid.rebuilder: check_type_comment, when the type comment is parsed as an ast, comment results in a 0-sized body, which leads to an IndexError.
Configuration
No response
Command used
Pylint output
Expected behavior
no crash, no error
Pylint version
OS / Environment
No response
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: