Skip to content

Commit c96221c

Browse files
committed
refactor(handler): Guard type hints imports with TYPE_CHECKING
1 parent e839380 commit c96221c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/powerapi/handler/handler.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,14 @@
2727
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2828
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2929

30+
from __future__ import annotations
31+
32+
from typing import TYPE_CHECKING
33+
3034
from powerapi.exception import PowerAPIException, UnknownMessageTypeException
31-
from powerapi.actor.message import Message
35+
36+
if TYPE_CHECKING:
37+
from powerapi.actor.message import Message
3238

3339

3440
class HandlerException(PowerAPIException):

0 commit comments

Comments
 (0)