gh-115775: Compiler adds __static_attributes__ field to classes (#115913)

This commit is contained in:
Irit Katriel 2024-03-26 15:18:17 +00:00 committed by GitHub
parent 70969d53a7
commit 79be75735c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 136 additions and 11 deletions

View file

@ -313,7 +313,8 @@ def visiblename(name, all=None, obj=None):
if name in {'__author__', '__builtins__', '__cached__', '__credits__',
'__date__', '__doc__', '__file__', '__spec__',
'__loader__', '__module__', '__name__', '__package__',
'__path__', '__qualname__', '__slots__', '__version__'}:
'__path__', '__qualname__', '__slots__', '__version__',
'__static_attributes__'}:
return 0
# Private names are hidden, but special names are displayed.
if name.startswith('__') and name.endswith('__'): return 1