Skip to content

Commit

Permalink
Fix type hints for old Python versions (< 3.10 I guess)
Browse files Browse the repository at this point in the history
  • Loading branch information
dostuffthatmatters committed Dec 29, 2023
1 parent e049670 commit 2c2e8d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/pages/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ content with its value.

```python
def date_range(from_date: datetime.date,
to_date: datetime.date) -> list[datetime.date]
to_date: datetime.date) -> List[datetime.date]
```

Returns a list of dates between from_date and to_date (inclusive).
Expand Down
4 changes: 2 additions & 2 deletions tum_esm_utils/timing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
import datetime
import signal
import time
from typing import Any, Generator
from typing import Any, Generator, List


def date_range(
from_date: datetime.date,
to_date: datetime.date,
) -> list[datetime.date]:
) -> List[datetime.date]:
"""Returns a list of dates between from_date and to_date (inclusive)."""
delta = to_date - from_date
assert delta.days >= 0, "from_date must be before to_date"
Expand Down

0 comments on commit 2c2e8d4

Please sign in to comment.