Skip to content

Commit

Permalink
Fix typo, add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ColeDCrawford committed Jun 11, 2024
1 parent 63a1573 commit b3205af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,8 @@ True
False

>>> parse_edtf("2004?-~06-~04")
PartialUncertainOrApproximate: '2004?-~06-~04'>>> L2_PartialUncertainOrApproximate.is_approximate
PartialUncertainOrApproximate: '2004?-~06-~04'
>>> parse_edtf("2004?-~06-~04").is_approximate
True
>>> parse_edtf("2004?-~06-~04").is_uncertain
True
Expand Down
2 changes: 1 addition & 1 deletion edtf/parser/parser_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ def __init__(
all_ua,
]
self.is_uncertain = any(
item.is_uncertain for item in uas if hasattr(item, "is_approximate")
item.is_uncertain for item in uas if hasattr(item, "is_uncertain")
)
self.is_approximate = any(
item.is_approximate for item in uas if hasattr(item, "is_approximate")
Expand Down
1 change: 1 addition & 0 deletions edtf/parser/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@
("1984~/2004-06", (False, True, False)),
("2004-%06", (False, False, True)),
("2004?-~06-~04", (True, True, False)),
("2004?-06-04", (True, False, False)),
("2011-~06-~04", (False, True, False)),
("2004-06-~01/2004-06-~20", (False, True, False)),
("156X~", (False, True, False)),
Expand Down

0 comments on commit b3205af

Please sign in to comment.