summaryrefslogtreecommitdiffstats
path: root/Lib/ast.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/ast.py')
-rw-r--r--Lib/ast.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/ast.py b/Lib/ast.py
index 08904af..226910e 100644
--- a/Lib/ast.py
+++ b/Lib/ast.py
@@ -1051,7 +1051,7 @@ class _Unparser(NodeVisitor):
self.fill("@")
self.traverse(deco)
self.fill("class " + node.name)
- self._typeparams_helper(node.typeparams)
+ self._type_params_helper(node.type_params)
with self.delimit_if("(", ")", condition = node.bases or node.keywords):
comma = False
for e in node.bases:
@@ -1083,7 +1083,7 @@ class _Unparser(NodeVisitor):
self.traverse(deco)
def_str = fill_suffix + " " + node.name
self.fill(def_str)
- self._typeparams_helper(node.typeparams)
+ self._type_params_helper(node.type_params)
with self.delimit("(", ")"):
self.traverse(node.args)
if node.returns:
@@ -1092,10 +1092,10 @@ class _Unparser(NodeVisitor):
with self.block(extra=self.get_type_comment(node)):
self._write_docstring_and_traverse_body(node)
- def _typeparams_helper(self, typeparams):
- if typeparams is not None and len(typeparams) > 0:
+ def _type_params_helper(self, type_params):
+ if type_params is not None and len(type_params) > 0:
with self.delimit("[", "]"):
- self.interleave(lambda: self.write(", "), self.traverse, typeparams)
+ self.interleave(lambda: self.write(", "), self.traverse, type_params)
def visit_TypeVar(self, node):
self.write(node.name)
@@ -1112,7 +1112,7 @@ class _Unparser(NodeVisitor):
def visit_TypeAlias(self, node):
self.fill("type ")
self.traverse(node.name)
- self._typeparams_helper(node.typeparams)
+ self._type_params_helper(node.type_params)
self.write(" = ")
self.traverse(node.value)