Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix circular imports caused by type annotations
Browse files Browse the repository at this point in the history
Imports that are only necessary for type annotations should be guarded.
lunkwill42 committed Jun 26, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 79b31dd commit 405339a
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/zino/flaps.py
Original file line number Diff line number Diff line change
@@ -3,6 +3,8 @@
Flapping is normally only tracked/updated based on incoming link traps.
"""

from __future__ import annotations

import logging
from datetime import datetime
from typing import TYPE_CHECKING, List, Optional, Tuple
8 changes: 7 additions & 1 deletion src/zino/tasks/task.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
from __future__ import annotations

from abc import ABC, abstractmethod
from typing import TYPE_CHECKING

from zino.config.models import PollDevice
from zino.snmp import SNMP
from zino.state import ZinoState

if TYPE_CHECKING:
from zino.state import ZinoState

from zino.statemodels import DeviceState


0 comments on commit 405339a

Please sign in to comment.