Skip to content

Commit f065bf4

Browse files
committed
Make converter_cls check more explicit
1 parent 4a992a9 commit f065bf4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/undate/undate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def format(self, format) -> str:
258258
"""format this undate as a string using the specified format;
259259
for now, only supports named converters"""
260260
converter_cls = BaseDateConverter.available_converters().get(format, None)
261-
if converter_cls:
261+
if converter_cls is not None:
262262
# NOTE: some parsers may return intervals; is that ok here?
263263
return converter_cls().to_string(self)
264264

0 commit comments

Comments
 (0)