Skip to content

Commit 5a212da

Browse files
EliEli
authored andcommitted
Spot check understands 9999 as special case year
1 parent f9ce443 commit 5a212da

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

dms_datastore/spot_check.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,11 @@ def _glob_count(root: Path, pattern: str) -> int:
485485

486486

487487
_YEAR_RE = re.compile(r"(?<!\d)(19\d{2}|20\d{2})(?!\d)")
488-
_RANGE_RE = re.compile(r"(?<!\d)(19\d{2}|20\d{2})_(19\d{2}|20\d{2})(?!\d)")
488+
489+
# Includes syear and eyear, with 9999 as a special "open" sentinel for convenience
490+
_RANGE_RE = re.compile(
491+
r"(?<!\d)(19\d{2}|20\d{2})_(19\d{2}|20\d{2}|9999)(?!\d)"
492+
)
489493

490494

491495
def _filter_files_covering_year(paths: Sequence[Path], year: int) -> List[Path]:

0 commit comments

Comments
 (0)