Skip to content

Commit 67212a5

Browse files
committed
fix: typeguard import
1 parent f12c3fd commit 67212a5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

fgpyo/util/metric.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
"""
118118

119119
import dataclasses
120+
import sys
120121
from abc import ABC
121122
from enum import Enum
122123
from inspect import isclass
@@ -127,9 +128,13 @@
127128
from typing import Generic
128129
from typing import Iterator
129130
from typing import List
130-
from typing import TypeGuard
131131
from typing import TypeVar
132132

133+
if sys.version_info >= (3, 10):
134+
from typing import TypeGuard
135+
else:
136+
from typing_extensions import TypeGuard
137+
133138
import attr
134139

135140
from fgpyo import io

0 commit comments

Comments
 (0)