Skip to content

Commit c5e56cb

Browse files
committed
Address review
1 parent bf56d55 commit c5e56cb

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

mypy/nodes.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,7 @@ class Node(Context):
176176
__slots__ = ()
177177

178178
def __str__(self) -> str:
179-
a = self.accept(mypy.strconv.StrConv(options=Options()))
180-
if a is None:
181-
# Some visitors might have empty bodies and actually return `None`
182-
return repr(self) # type: ignore[unreachable]
183-
return a
179+
return self.accept(mypy.strconv.StrConv(options=Options()))
184180

185181
def str_with_options(self, options: Options) -> str:
186182
a = self.accept(mypy.strconv.StrConv(options=options))

0 commit comments

Comments
 (0)