Home
last modified time | relevance | path

Searched refs:type_comment (Results 1 – 19 of 19) sorted by relevance

/external/python/cpython3/Lib/test/
Dtest_type_comments.py249 self.assertEqual(tree.body[0].type_comment, "() -> int")
250 self.assertEqual(tree.body[1].type_comment, "() -> None")
252 self.assertEqual(tree.body[0].type_comment, None)
253 self.assertEqual(tree.body[1].type_comment, None)
257 self.assertEqual(tree.body[0].type_comment, "() -> int")
258 self.assertEqual(tree.body[1].type_comment, "() -> int")
260 self.assertEqual(tree.body[0].type_comment, None)
261 self.assertEqual(tree.body[1].type_comment, None)
290 self.assertEqual(tree.body[0].type_comment, "() -> àçčéñt")
294 self.assertEqual(tree.body[0].type_comment, "int")
[all …]
/external/python/cpython3/Parser/
DPython.asdl13 string? type_comment)
16 string? type_comment)
26 | Assign(expr* targets, expr value, string? type_comment)
32 | For(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)
33 | AsyncFor(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)
36 | With(withitem* items, stmt* body, string? type_comment)
37 | AsyncWith(withitem* items, stmt* body, string? type_comment)
112 arg = (identifier arg, expr? annotation, string? type_comment)
/external/tensorflow/tensorflow/python/autograph/pyct/
Dloader_test.py58 'a', ctx=gast.Param(), annotation=None, type_comment=None)
74 type_comment=None),
79 type_comment=None)
Dparser_test.py348 type_comment=None)
351 'b', ctx=gast.Load(), annotation=None, type_comment=None))
360 type_comment=None)
Dgast_util.py74 Name = functools.partial(gast.Name, type_comment=None) # pylint:disable=invalid-name
Dtranspiler.py123 gast.Name(name, ctx=gast.Param(), annotation=None, type_comment=None)
479 type_comment=None)
Dtemplates_test.py125 type_comment=None)
132 type_comment=None), gast.Add(),
Dtemplates.py224 return gast.Name(id=n, ctx=None, annotation=None, type_comment=None)
Dqual_names.py220 base, ctx=CallerMustSetThis, annotation=None, type_comment=None)
Dast_util.py92 type_comment=None)
Dtransformer_test.py162 'x', ctx=gast.Load(), annotation=None, type_comment=None),
/external/python/cpython3/Include/
DPython-ast.h93 string type_comment; member
102 string type_comment; member
124 string type_comment; member
145 string type_comment; member
153 string type_comment; member
171 string type_comment; member
177 string type_comment; member
420 string type_comment; member
471 type_comment, int lineno, int col_offset, int
476 string type_comment, int lineno, int col_offset,
[all …]
/external/python/cpython3/Python/
DPython-ast.c215 PyObject *type_comment; member
460 Py_CLEAR(state->type_comment); in _PyAST_Fini()
543 if ((state->type_comment = PyUnicode_InternFromString("type_comment")) == NULL) return 0; in init_identifiers()
1273 if (PyObject_SetAttr(state->FunctionDef_type, state->type_comment, Py_None) in init_types()
1284 if (PyObject_SetAttr(state->AsyncFunctionDef_type, state->type_comment, in init_types()
1305 if (PyObject_SetAttr(state->Assign_type, state->type_comment, Py_None) == in init_types()
1321 if (PyObject_SetAttr(state->For_type, state->type_comment, Py_None) == -1) in init_types()
1327 if (PyObject_SetAttr(state->AsyncFor_type, state->type_comment, Py_None) == in init_types()
1341 if (PyObject_SetAttr(state->With_type, state->type_comment, Py_None) == -1) in init_types()
1347 if (PyObject_SetAttr(state->AsyncWith_type, state->type_comment, Py_None) in init_types()
[all …]
Dast.c825 string type_comment = new_type_comment(STR(CHILD(ch, i)), &c); in PyAST_FromNodeObject() local
826 if (!type_comment) in PyAST_FromNodeObject()
828 type_ignore_ty ti = TypeIgnore(LINENO(CHILD(ch, i)), type_comment, arena); in PyAST_FromNodeObject()
1397 arg->type_comment = NEW_TYPE_COMMENT(ch); in handle_keywordonly_args()
1398 if (!arg->type_comment) in handle_keywordonly_args()
1631 vararg->type_comment = NEW_TYPE_COMMENT(CHILD(n, i)); in ast_for_arguments()
1632 if (!vararg->type_comment) in ast_for_arguments()
1664 arg->type_comment = NEW_TYPE_COMMENT(ch); in ast_for_arguments()
1665 if (!arg->type_comment) in ast_for_arguments()
1725 string type_comment = NULL; in ast_for_funcdef_impl() local
[all …]
/external/tensorflow/tensorflow/python/autograph/converters/
Dcall_trees.py78 'tuple', ctx=gast.Load(), annotation=None, type_comment=None),
154 'dict', ctx=gast.Load(), annotation=None, type_comment=None),
/external/python/cpython3/Doc/library/
Dast.rst735 .. class:: Assign(targets, value, type_comment)
743 .. attribute:: type_comment
745 ``type_comment`` is an optional string with the type annotation as a comment.
1022 .. class:: For(target, iter, body, orelse, type_comment)
1030 .. attribute:: type_comment
1032 ``type_comment`` is an optional string with the type annotation as a comment.
1198 .. class:: With(items, body, type_comment)
1203 .. attribute:: type_comment
1205 ``type_comment`` is an optional string with the type annotation as a comment.
1245 .. class:: FunctionDef(name, args, body, decorator_list, returns, type_comment)
[all …]
/external/python/cpython3/Lib/
Dast.py786 comment = self._type_ignores.get(node.lineno) or node.type_comment
858 if type_comment := self.get_type_comment(node):
859 self.write(type_comment)
/external/python/cpython3/Parser/pegen/
Dpegen.c1922 function_def->v.FunctionDef.type_comment, function_def->lineno, in _PyPegen_function_def_decorators()
1930 function_def->v.FunctionDef.type_comment, function_def->lineno, in _PyPegen_function_def_decorators()
/external/python/cpython3/Tools/c-analyzer/
Dknown.tsv1412 Python/Python-ast.c - PyId_type_comment variable _Py_IDENTIFIER(type_comment)