Skip to content

Commit 4ebfcfb

Browse files
committed
fix tests
1 parent dbe559f commit 4ebfcfb

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

Lib/pydoc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,8 @@ def visiblename(name, all=None, obj=None):
330330
'__date__', '__doc__', '__file__', '__spec__',
331331
'__loader__', '__module__', '__name__', '__package__',
332332
'__path__', '__qualname__', '__slots__', '__version__',
333-
'__static_attributes__', '__firstlineno__'}:
333+
'__static_attributes__', '__firstlineno__',
334+
'__annotate_func__', '__annotations_cache__'}:
334335
return 0
335336
# Private names are hidden, but special names are displayed.
336337
if name.startswith('__') and name.endswith('__'): return 1

Lib/test/test_ast/test_ast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def test_arguments(self):
298298
x = ast.arguments()
299299
self.assertEqual(x._fields, ('posonlyargs', 'args', 'vararg', 'kwonlyargs',
300300
'kw_defaults', 'kwarg', 'defaults'))
301-
self.assertEqual(x.__annotations__, {
301+
self.assertEqual(ast.arguments.__annotations__, {
302302
'posonlyargs': list[ast.arg],
303303
'args': list[ast.arg],
304304
'vararg': ast.arg | None,

Lib/test/test_pydoc/test_pydoc.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,6 @@ class A(builtins.object)
7878
| __weakref__%s
7979
8080
class B(builtins.object)
81-
| Methods defined here:
82-
|
83-
| __annotate__(format, /)
84-
|
85-
| ----------------------------------------------------------------------
8681
| Data descriptors defined here:
8782
|
8883
| __dict__%s
@@ -180,9 +175,6 @@ class A(builtins.object)
180175
list of weak references to the object
181176
182177
class B(builtins.object)
183-
Methods defined here:
184-
__annotate__(format, /)
185-
----------------------------------------------------------------------
186178
Data descriptors defined here:
187179
__dict__
188180
dictionary for instance variables

0 commit comments

Comments
 (0)