Skip to content

Commit

Permalink
fix py3.11 typing import
Browse files Browse the repository at this point in the history
  • Loading branch information
bpinsard committed Jan 16, 2024
1 parent ca98318 commit c61aa29
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions heudiconv/dicoms.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from pathlib import Path
import sys
import tarfile
from typing_extensions import Protocol
from typing import TYPE_CHECKING, Any, Dict, Hashable, List, NamedTuple, Optional, Union, overload
from unittest.mock import patch
import warnings
Expand All @@ -27,9 +26,13 @@

if TYPE_CHECKING:
if sys.version_info >= (3, 8):
from typing import Literal
from typing import Literal, Protocol
else:
from typing_extensions import Literal
from typing_extensions import Literal, Protocol
if sys.version_info >= (3, 8):
from typing import Protocol
else:
from typing_extensions import Protocol

with warnings.catch_warnings():
warnings.simplefilter("ignore")
Expand Down

0 comments on commit c61aa29

Please sign in to comment.