Add a few more dunders

Clean up comments
This commit is contained in:
Kazuya O'moto
2025-03-30 02:33:51 +09:00
parent fbd25d56fc
commit 636dab57b8
2 changed files with 3 additions and 11 deletions

View File

@@ -40,7 +40,7 @@ def getAttributeNames(obj, includeMagic=1, includeSingle=1,
# Add some attributes that don't always get picked up.
special_attrs = ['__bases__', '__class__', '__dict__', '__name__',
'__closure__', '__code__', '__defaults__',
'__globals__',
'__kwdefaults__', '__globals__', '__qualname__',
'__builtins__', # Added to method attributes in 3.10
'__get__', # Not found in `dir(method)` in 3.11
]

View File

@@ -449,6 +449,7 @@ class GetAttributeTestCase(unittest.TestCase):
'__invert__',
'__itemsize__',
'__iter__',
'__kwdefaults__',
'__le__',
'__len__',
'__long__',
@@ -468,6 +469,7 @@ class GetAttributeTestCase(unittest.TestCase):
'__path__',
'__pos__',
'__pow__',
'__qualname__',
'__radd__',
'__rand__',
'__rdiv__',
@@ -527,18 +529,8 @@ class GetAttributeTestCase(unittest.TestCase):
'fileno',
'find',
'flush',
# 'func_closure',
# 'func_code',
# 'func_defaults',
# 'func_dict',
# 'func_doc',
# 'func_globals',
# 'func_name',
'get',
'has_key',
# 'im_class',
# 'im_func',
# 'im_self',
'imag',
'index',
'insert',