/external/python/cpython3/Lib/test/ |
D | mod_generics_cache.py | 29 __annotations__ = dict( variable 40 __annotations__ = dict( variable in A 49 __annotations__ = dict( variable in B
|
D | test_grammar.py | 312 self.assertEqual(f.__annotations__, {}) 336 self.assertEqual(C.__annotations__, {'_C__foo': int, 's': str}) 352 self.assertEqual(CC.__annotations__['xx'], 'ANNOT') 356 print(test.__annotations__) 357 self.assertEqual(ann_module.__annotations__, 359 self.assertEqual(ann_module.M.__annotations__, 361 self.assertEqual(ann_module2.__annotations__, {}) 584 self.assertEqual(f.__annotations__, {'return': list}) 586 self.assertEqual(f.__annotations__, {'x': int}) 588 self.assertEqual(f.__annotations__, {'x': str}) [all …]
|
D | ann_module.py | 10 __annotations__[1] = 2 21 __annotations__['123'] = 123
|
D | test_opcodes.py | 37 C.__annotations__ 49 del __annotations__
|
D | ann_module3.py | 7 __annotations__[1] = 2
|
D | ann_module2.py | 25 __annotations__ = {} variable
|
D | test_future.py | 123 func_ret_ann = scope['f'].__annotations__['return'] 124 func_arg_ann = scope['g'].__annotations__['arg']
|
D | test_dataclasses.py | 539 self.assertIn(f.name, C.__annotations__) 740 self.assertEqual(cls.__annotations__['i'], int) 741 self.assertEqual(cls.__annotations__['j'], str) 742 self.assertEqual(cls.__annotations__['k'], F) 743 self.assertEqual(cls.__annotations__['l'], float) 744 self.assertEqual(cls.__annotations__['z'], complex) 856 self.assertEqual(list(C.__annotations__), ['i']) 984 self.assertEqual(len(C.__annotations__), 6) # And 4 ClassVars. 1042 self.assertEqual(len(C.__annotations__), 5) # And 3 ClassVars 2994 self.assertEqual(C.__annotations__, {'x': 'typing.Any', [all …]
|
D | test_typing.py | 1866 testf.__annotations__['x'] = 'int' 1875 b.__annotations__ = {'x': 'A'} 2458 self.assertEqual(Emp.__annotations__, 2460 self.assertIs(Emp._field_types, Emp.__annotations__) 2478 self.assertEqual(CoolEmployee.__annotations__, 2480 self.assertIs(CoolEmployee._field_types, CoolEmployee.__annotations__) 2532 self.assertEqual(LocalEmployee.__annotations__, dict(name=str, age=int)) 2533 self.assertIs(LocalEmployee._field_types, LocalEmployee.__annotations__) 2556 a = stuff.__annotations__['a'] 2564 a = stuff.__annotations__['a'] [all …]
|
D | test_inspect.py | 829 self.assertEqual(test.__annotations__, spec.annotations) 833 self.assertEqual(test.__annotations__, spec.annotations) 2230 self.__annotations__ = func.__annotations__ 2284 __annotations__ = func.__annotations__ variable in TestSignatureObject.test_signature_functionlike_class.funclike
|
D | test_functools.py | 613 self.assertEqual(wrapper.__annotations__['a'], 'This is a new annotation') 614 self.assertNotIn('b', wrapper.__annotations__) 634 self.assertEqual(wrapper.__annotations__, {}) 685 self.assertEqual(wrapper.__annotations__, {})
|
/external/python/cpython2/Lib/lib2to3/tests/data/ |
D | py3_test_grammar.py | 297 self.assertEquals(f.__annotations__, {'return': list}) 299 self.assertEquals(f.__annotations__, {'x': int}) 301 self.assertEquals(f.__annotations__, {'x': str}) 303 self.assertEquals(f.__annotations__, {'x': float}) 305 self.assertEquals(f.__annotations__, {'y': 3}) 307 self.assertEquals(f.__annotations__, {'b': 1, 'c': 2}) 309 self.assertEquals(f.__annotations__, 313 self.assertEquals(f.__annotations__, 320 self.assertEquals(f.__annotations__, {'return': list})
|
/external/python/cpython3/Lib/lib2to3/tests/data/ |
D | py3_test_grammar.py | 321 self.assertEquals(f.__annotations__, {'return': list}) 323 self.assertEquals(f.__annotations__, {'x': int}) 325 self.assertEquals(f.__annotations__, {'x': str}) 327 self.assertEquals(f.__annotations__, {'x': float}) 329 self.assertEquals(f.__annotations__, {'y': 3}) 331 self.assertEquals(f.__annotations__, {'b': 1, 'c': 2}) 333 self.assertEquals(f.__annotations__, 337 self.assertEquals(f.__annotations__, 344 self.assertEquals(f.__annotations__, {'return': list})
|
/external/python/cpython3/Lib/ |
D | reprlib.py | 31 wrapper.__annotations__ = getattr(user_function, '__annotations__', {})
|
D | typing.py | 1330 nm_tpl.__annotations__ = nm_tpl._field_types = collections.OrderedDict(types) 1365 nm_tpl.__new__.__annotations__ = collections.OrderedDict(types)
|
D | inspect.py | 2138 annotations = func.__annotations__
|
/external/python/cpython3/Doc/library/ |
D | functools.rst | 405 function's ``__module__``, ``__name__``, ``__qualname__``, ``__annotations__`` 430 Copying of the ``__annotations__`` attribute by default.
|
D | typing.rst | 891 This is often the same as ``obj.__annotations__``. In addition, 896 a dictionary constructed by merging all the ``__annotations__`` along
|
D | dataclasses.rst | 338 mechanism for creating a new class with ``__annotations__`` can
|
/external/python/cpython3/Python/ |
D | compile.c | 216 static PyObject *__doc__, *__annotations__; variable 314 if (!__annotations__) { in PyAST_CompileObject() 315 __annotations__ = PyUnicode_InternFromString("__annotations__"); in PyAST_CompileObject() 316 if (!__annotations__) in PyAST_CompileObject() 4724 ADDOP_NAME(c, LOAD_NAME, __annotations__, names); in compiler_annassign()
|
/external/python/mock/mock/tests/ |
D | testpatch.py | 1873 self.assertEqual(foo.__annotations__, dict([('s', 1, )])) 1874 self.assertEqual(foo.__annotations__, dict())
|
/external/python/cpython3/Lib/unittest/test/testmock/ |
D | testpatch.py | 1865 self.assertEqual(foo.__annotations__, dict([('s', 1, )])) 1866 self.assertEqual(foo.__annotations__, dict())
|
/external/python/cpython3/Doc/tutorial/ |
D | controlflow.rst | 685 :term:`Annotations <function annotation>` are stored in the :attr:`__annotations__` 695 ... print("Annotations:", f.__annotations__)
|
/external/python/cpython3/Doc/reference/ |
D | datamodel.rst | 468 single: __annotations__ (function attribute) 519 | :attr:`__annotations__` | A dict containing annotations | Writable | 720 single: __annotations__ (module attribute) 725 unavailable; :attr:`__annotations__` (optional) is a dictionary containing 794 single: __annotations__ (class attribute) 801 or ``None`` if undefined; :attr:`__annotations__` (optional) is a dictionary
|
D | compound_stmts.rst | 579 a dictionary keyed by the parameters' names in the :attr:`__annotations__`
|