We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Apr 30 11:15:39 2023 """ # pylint: disable=W0104,W0107,C0115,C0199,C0116,C0103,W0106 import typing try: try: ex_list = [ValueError("a"), ValueError("b"), Exception("c")] raise ExceptionGroup("exceptions!", ex_list) except* ValueError as exc: print(repr(exc)) typing.reveal_type(exc) assert isinstance(exc, ExceptionGroup) assert hasattr(exc, "message") assert hasattr(exc, "exceptions") # E1101:no-member: 25,8: Instance of 'ValueError' has no 'message' member exc.message # E1101:no-member: 28,8: Instance of 'ValueError' has no 'exceptions' member exc.exceptions # E1101:no-member: 31,8: Instance of 'ValueError' has no 'message' member typing.cast(ExceptionGroup, exc).message pass except ExceptionGroup as exc: print(repr(exc)) exc.message # this works exc.exceptions pass
No response
pylint Schreibtisch/test.py
************* Module test Schreibtisch/test.py:25:8: E1101: Instance of 'ValueError' has no 'message' member (no-member) Schreibtisch/test.py:28:8: E1101: Instance of 'ValueError' has no 'exceptions' member (no-member) Schreibtisch/test.py:31:8: E1101: Instance of 'ValueError' has no 'message' member (no-member) ------------------------------------------------------------------ Your code has been rated at 2.50/10 (previous run: 2.50/10, +0.00)
Type of exc should be inferred as ExceptionGroup
pylint 2.17.4 astroid 2.15.6 Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0]
uname -a Linux odysseus 6.1.0-12-arm64 #1 SMP Debian 6.1.52-1 (2023-09-07) aarch64 GNU/Linux
The text was updated successfully, but these errors were encountered:
Thank you for reporting the issue. The fix for #8985 will possibly also fix this.
Sorry, something went wrong.
No branches or pull requests
Bug description
Configuration
No response
Command used
Pylint output
Expected behavior
Type of exc should be inferred as ExceptionGroup
Pylint version
OS / Environment
uname -a
Linux odysseus 6.1.0-12-arm64 #1 SMP Debian 6.1.52-1 (2023-09-07) aarch64 GNU/Linux
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: