Skip to content
New issue

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

fix: get name of a raised exception when bound in except #184

Merged
merged 3 commits into from
Dec 14, 2024

Conversation

Amar1729
Copy link
Contributor

@Amar1729 Amar1729 commented Dec 8, 2024

When code uses raise <> as e and then raise e, we previously were incorrectly yielding e (the subnode.id) rather than determining the originally-bound name of the exception. This introduces an additional check for AST nodes which look like an exception handler with a name binding.


closes #175

Amar1729 and others added 3 commits December 8, 2024 18:21
When code uses `raise <> as e` and then `raise e`, we previously were
incorrectly yielding `e` (the `subnode.id`) rather than determining the
originally-bound name of the exception. This introduces an additional
check for AST nodes which look like an exception handler with a name
binding.
@jsh9 jsh9 merged commit 3b4dcb5 into jsh9:main Dec 14, 2024
16 checks passed
@Amar1729 Amar1729 deleted the 175-get-name-from-exceptionhandler branch December 15, 2024 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pydoclint uses variable instead of exception itself
2 participants