Skip to content

Commit

Permalink
Fix strconv not displaying False and possibly other falsy values (#10196
Browse files Browse the repository at this point in the history
)

This fixes strconv not displaying False and possibly other falsy values. 
I ran into this problem while writing tests for #10191.
  • Loading branch information
freundTech authored Mar 10, 2021
1 parent 28034cc commit f0a2c9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mypy/strconv.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ def dump_tagged(nodes: Sequence[object], tag: Optional[str], str_conv: 'StrConv'
a.append(indent(n.accept(str_conv), 2))
elif isinstance(n, Type):
a.append(indent(n.accept(TypeStrVisitor(str_conv.id_mapper)), 2))
elif n:
elif n is not None:
a.append(indent(str(n), 2))
if tag:
a[-1] += ')'
Expand Down

0 comments on commit f0a2c9f

Please sign in to comment.