Skip to content

Commit

Permalink
Use typing-extensions for python < 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
sjperkins committed Sep 9, 2024
1 parent 3caa0b7 commit 7bddc05
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dask = {version = "^2024.5.0", optional = true, extras = ["testing"]}
distributed = {version = "^2024.5.0", optional = true, extras = ["testing"]}
cacheout = "^0.16.0"
arcae = "^0.2.4"
typing-extensions = { version = "^4.12.2", python = "<3.11" }

[tool.poetry.extras]
testing = ["dask", "distributed", "pytest"]
Expand Down
10 changes: 9 additions & 1 deletion xarray_ms/backend/msv2/encoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,16 @@

from __future__ import annotations

import sys
from datetime import datetime
from typing import TYPE_CHECKING, Any, Dict, List, Self
from typing import TYPE_CHECKING, Any, Dict, List

if TYPE_CHECKING:
if sys.version_info >= (3, 11):
from typing import Self
else:
from typing_extensions import Self


import numpy as np
import numpy.testing as npt
Expand Down

0 comments on commit 7bddc05

Please sign in to comment.