mirror of
https://github.com/python/cpython.git
synced 2025-01-20 15:34:52 +08:00
gh-104683: Argument Clinic: Remove unreachable code from _module_and_class() (#108092)
'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.
This commit is contained in:
parent
80f30cf51b
commit
292a22bdc2
@ -2427,8 +2427,6 @@ impl_definition block
|
||||
if child:
|
||||
parent = module = child
|
||||
continue
|
||||
if not hasattr(parent, 'classes'):
|
||||
return module, cls
|
||||
child = parent.classes.get(field)
|
||||
if not child:
|
||||
fullname = ".".join(so_far)
|
||||
|
Loading…
Reference in New Issue
Block a user