Skip to content

Commit

Permalink
fix output types for date | datetime (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
scottstanie authored Feb 25, 2025
1 parent 2a1ab17 commit deec0a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/opera_utils/_dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def group_by_date(

def sort_files_by_date(
files: Iterable[Filename], file_date_fmt: str = "%Y%m%d"
) -> tuple[list[Filename], list[list[datetime.date]]]:
) -> tuple[list[Filename], list[list[datetime.date | datetime.datetime]]]:
"""Sort a list of files by date.
If some files have multiple dates, the files with the most dates are sorted
Expand All @@ -219,7 +219,7 @@ def sort_files_by_date(
-------
file_list : list[Filename]
list of files sorted by date.
dates : list[list[datetime.date,...]]
dates : list[list[datetime.date | datetime.datetime]]
Sorted list, where each entry has all the dates from the corresponding file.
"""
file_date_tuples = [(f, get_dates(f, fmt=file_date_fmt)) for f in files]
Expand Down

0 comments on commit deec0a7

Please sign in to comment.