Skip to content

Commit cda078d

Browse files
committed
Use f-string
Co-authored-by: brianschubert
1 parent 3bcc5bd commit cda078d

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

mypy/stubdoc.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,7 @@ def format_sig(
142142
retfield = " -> " + ret_type
143143

144144
prefix = "async " if is_async else ""
145-
sig = "{indent}{prefix}def {name}{type_args}({args}){ret}:".format(
146-
indent=indent,
147-
prefix=prefix,
148-
name=self.name,
149-
args=", ".join(args),
150-
ret=retfield,
151-
type_args=self.type_args,
152-
)
145+
sig = f"{indent}{prefix}def {self.name}{self.type_args}({', '.join(args)}){retfield}:"
153146
if docstring:
154147
suffix = f"\n{indent} {mypy.util.quote_docstring(docstring)}"
155148
else:

0 commit comments

Comments
 (0)