forked from p34709852/monkey
Common: Move base_models.py to common
This commit is contained in:
parent
acc158db44
commit
3a94be8766
|
@ -4,3 +4,4 @@ Used for a common things between agent and island
|
||||||
from .di_container import DIContainer, UnresolvableDependencyError
|
from .di_container import DIContainer, UnresolvableDependencyError
|
||||||
from .operating_system import OperatingSystem
|
from .operating_system import OperatingSystem
|
||||||
from . import types
|
from . import types
|
||||||
|
from . import base_models
|
||||||
|
|
|
@ -4,8 +4,9 @@ from uuid import UUID
|
||||||
|
|
||||||
from pydantic import Field
|
from pydantic import Field
|
||||||
|
|
||||||
|
from common.base_models import MutableBaseModel
|
||||||
|
|
||||||
from . import MachineID
|
from . import MachineID
|
||||||
from .base_models import MutableBaseModel
|
|
||||||
|
|
||||||
|
|
||||||
class Agent(MutableBaseModel):
|
class Agent(MutableBaseModel):
|
||||||
|
|
|
@ -4,9 +4,9 @@ from typing import Optional, Sequence
|
||||||
from pydantic import Field, PositiveInt, validator
|
from pydantic import Field, PositiveInt, validator
|
||||||
|
|
||||||
from common import OperatingSystem
|
from common import OperatingSystem
|
||||||
|
from common.base_models import MutableBaseModel
|
||||||
from common.types import HardwareID
|
from common.types import HardwareID
|
||||||
|
|
||||||
from .base_models import MutableBaseModel
|
|
||||||
from .transforms import make_immutable_sequence
|
from .transforms import make_immutable_sequence
|
||||||
|
|
||||||
MachineID = PositiveInt
|
MachineID = PositiveInt
|
||||||
|
|
|
@ -2,8 +2,9 @@ from typing import Sequence, Tuple
|
||||||
|
|
||||||
from pydantic import Field, validator
|
from pydantic import Field, validator
|
||||||
|
|
||||||
|
from common.base_models import MutableBaseModel
|
||||||
|
|
||||||
from . import CommunicationType, MachineID
|
from . import CommunicationType, MachineID
|
||||||
from .base_models import MutableBaseModel
|
|
||||||
from .transforms import make_immutable_nested_sequence
|
from .transforms import make_immutable_nested_sequence
|
||||||
|
|
||||||
ConnectionsSequence = Sequence[Tuple[MachineID, Sequence[CommunicationType]]]
|
ConnectionsSequence = Sequence[Tuple[MachineID, Sequence[CommunicationType]]]
|
||||||
|
|
Loading…
Reference in New Issue