Skip to content

Commit 9a9cb90

Browse files
committed
Fixing import issue
Signed-off-by: Kevin Eykholt <[email protected]>
1 parent 5b07d2e commit 9a9cb90

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

art/estimators/classification/classifier.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
This module implements mixin abstract base classes defining properties for all classifiers in ART.
2020
"""
2121
from abc import ABC, ABCMeta, abstractmethod
22-
from typing import List, Optional, Union
22+
from typing import List, Optional, TYPE_CHECKING, Union
2323

2424
import numpy as np
2525

@@ -29,7 +29,9 @@
2929
LossGradientsMixin,
3030
DecisionTreeMixin,
3131
)
32-
from art.utils import CLASSIFIER_TYPE
32+
33+
if TYPE_CHECKING:
34+
from art.utils import CLASSIFIER_TYPE
3335

3436

3537
class InputFilter(ABCMeta):
@@ -118,7 +120,7 @@ def nb_classes(self, nb_classes: int):
118120

119121
self._nb_classes = nb_classes
120122

121-
def clone_for_refitting(self) -> CLASSIFIER_TYPE:
123+
def clone_for_refitting(self) -> "CLASSIFIER_TYPE":
122124
raise NotImplementedError
123125

124126

0 commit comments

Comments
 (0)