Skip to content

Commit bc4e9d2

Browse files
author
Doug Ollerenshaw
committed
replace typing Protocol import
1 parent 526c747 commit bc4e9d2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

allensdk/core/typing.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
from typing import _Protocol
1+
import sys
2+
if sys.version_info.minor <= 7:
3+
from typing import _Protocol as Protocol
4+
else:
5+
from typing import Protocol
26
from abc import abstractmethod
37

48

5-
class SupportsStr(_Protocol):
9+
class SupportsStr(Protocol):
610
"""Classes that support the __str__ method"""
711
@abstractmethod
812
def __str__(self) -> str:

0 commit comments

Comments
 (0)