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

gh-104683: Argument Clinic: Remove unreachable code from _module_and_class() #108092

Merged

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented Aug 17, 2023

'not hasattr(parent, "classes")' is always false, since 'parent' is an
instance of either the Module, Class, or Clinic classes, and all of
them has a "classes" attribute.

…e_and_class()

The hasattr(parent, "classes") check is unneeded, since 'parent' is an
instance of either the Module, Class, or Clinic classes, and all of
them has a "classes" attribute.
@erlend-aasland erlend-aasland enabled auto-merge (squash) August 17, 2023 17:50
@erlend-aasland erlend-aasland merged commit 292a22b into python:main Aug 17, 2023
20 checks passed
@erlend-aasland erlend-aasland deleted the clinic/no-hasattr-classes-for-you branch August 17, 2023 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants