Skip to content

Commit 9bd142d

Browse files
committed
Fixed: UA is a single state, no need for append
1 parent d3d0cd5 commit 9bd142d

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

edtf/parser/parser_classes.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -465,14 +465,13 @@ def __init__(self, *args) -> None: # noqa: super() raises not implemented
465465
self.is_uncertain_and_approximate: bool = "%" in ua
466466

467467
def __str__(self) -> str:
468-
d: list = []
469468
if self.is_uncertain:
470-
d.append("?")
471-
if self.is_approximate:
472-
d.append("~")
473-
if self.is_uncertain_and_approximate:
474-
d.append("%")
475-
return "".join(d)
469+
return "?"
470+
elif self.is_approximate:
471+
return "~"
472+
elif self.is_uncertain_and_approximate:
473+
return "%"
474+
return ""
476475

477476
def _get_multiplier(self) -> float | None:
478477
if self.is_uncertain_and_approximate:

0 commit comments

Comments
 (0)