File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -542,12 +542,15 @@ def _make_cached_property_uncached(original_cached_property_func, cls):
542542 "@property" ,
543543 defline ,
544544 * doc_lines ,
545- " for entry in type.__dict__['__mro__'].__get__(self.__class__):" ,
546- f" if '{ name } _cache' in entry.__dict__:" ,
547- f" descriptor = entry.__dict__['{ name } _cache']" ,
548- " break" ,
549- " else:" ,
550- " raise AttributeError('No descriptor')" ,
545+ " clsd = self.__class__.__dict__" ,
546+ f" descriptor = clsd.get('{ name } _cache')" ,
547+ " if descriptor is None:" ,
548+ " for entry in type.__dict__['__mro__'].__get__(self.__class__)[1:]:" ,
549+ f" descriptor = entry.__dict__.get('{ name } _cache')" ,
550+ " if descriptor is not None:" ,
551+ " break" ,
552+ " else:" ,
553+ " raise AttributeError('No descriptor')" ,
551554 " try:" ,
552555 " return descriptor.__get__(self, self.__class__)" ,
553556 " except AttributeError:" ,
You can’t perform that action at this time.
0 commit comments