Skip to content

Commit f0a2c9f

Browse files
authored
Fix strconv not displaying False and possibly other falsy values (#10196)
This fixes strconv not displaying False and possibly other falsy values. I ran into this problem while writing tests for #10191.
1 parent 28034cc commit f0a2c9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/strconv.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ def dump_tagged(nodes: Sequence[object], tag: Optional[str], str_conv: 'StrConv'
564564
a.append(indent(n.accept(str_conv), 2))
565565
elif isinstance(n, Type):
566566
a.append(indent(n.accept(TypeStrVisitor(str_conv.id_mapper)), 2))
567-
elif n:
567+
elif n is not None:
568568
a.append(indent(str(n), 2))
569569
if tag:
570570
a[-1] += ')'

0 commit comments

Comments
 (0)