Skip to content

Commit bd57454

Browse files
Update stubgen.py
1 parent 548f610 commit bd57454

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypy/stubgen.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,13 +1021,13 @@ def is_typed_namedtuple(self, expr: CallExpr) -> bool:
10211021
def _get_namedtuple_fields(self, call: CallExpr) -> list[tuple[str, str]] | None:
10221022
if self.is_namedtuple(call):
10231023
fields_arg = call.args[1]
1024-
folded = constant_fold_expr(fields_arg, "unused")
1024+
folded = constant_fold_expr(fields_arg, "<unused>")
10251025
if isinstance(folded, str):
10261026
field_names = folded.replace(",", " ").split()
10271027
elif isinstance(fields_arg, (ListExpr, TupleExpr)):
10281028
field_names = []
10291029
for field in fields_arg.items:
1030-
folded = constant_fold_expr(fields_arg, "unused")
1030+
folded = constant_fold_expr(fields_arg, "<unused>")
10311031
if not isinstance(folded, str):
10321032
return None
10331033
field_names.append(folded)

0 commit comments

Comments
 (0)