Closed maxludden closed 1 year ago
Thanks for creating the issue.
Simple reproducer:
cat example.py
try:
[][0]
except* IndexError:
print("key error here")
pylint example.py
I can't reproduce it on the latest pylint and astroid branches. @cdce8p was there a fix recently?
Support for ExceptionGroups (except* ...
) was added in astroid 2.15.0
.
This looks like an issue with the VSCode pylint extension which still uses an outdated version. You can try to enable debug logging which might print the used version or even set pylint.importStrategy: fromEnvironment
in your settings.json
.
Bug description
When parsing the following file:
pylint crashed with a
AstroidBuildingError
and with the following stacktrace:Configuration
No response
Command used
Pylint output
OS / Environment
Hardware
2020 Macbook Air M1
OS
MacOS Ventura 13.3.1
Terminal
VS Code, Integrated Terminal, Default Osx Profile: zsh
Additional dependencies
Package Manager
PDM
pyproject.toml
PDM list