We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf56d55 commit c5e56cbCopy full SHA for c5e56cb
mypy/nodes.py
@@ -176,11 +176,7 @@ class Node(Context):
176
__slots__ = ()
177
178
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
+ return self.accept(mypy.strconv.StrConv(options=Options()))
184
185
def str_with_options(self, options: Options) -> str:
186
a = self.accept(mypy.strconv.StrConv(options=options))
0 commit comments