Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pydantic missing type annotations #53

Merged
merged 1 commit into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions manager/comms/consumer_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import json
from functools import singledispatchmethod
from typing import Any
from typing import Any, Optional

from pydantic import BaseModel

Expand All @@ -16,7 +16,7 @@ class ManagerConsumerMessage(BaseModel):
"""
id: str
command: str
data: Any
data: Optional[Any] = None

def response(self, response: Any = None) -> ManagerConsumerMessage:
"""
Expand Down
9 changes: 5 additions & 4 deletions manager/manager/launcher/launcher_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
import time
import os
import stat
from typing import List, Any


class LauncherConsole(ILauncher):
display: str
internal_port: str
external_port: str
running = False
threads = []
internal_port: int
external_port: int
running:bool = False
threads: List[Any] = []

def run(self, callback):
DRI_PATH = os.path.join("/dev/dri", os.environ.get("DRI_NAME", "card0"))
Expand Down
2 changes: 1 addition & 1 deletion manager/manager/launcher/launcher_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class LauncherEngine(BaseModel):
exercise_id: str
launch: dict

module = '.'.join(__name__.split('.')[:-1])
module:str = '.'.join(__name__.split('.')[:-1])
terminated_callback: Any = None

def run(self):
Expand Down
9 changes: 5 additions & 4 deletions manager/manager/launcher/launcher_gazebo_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@
import time
import os
import stat
from typing import List, Any


class LauncherGazeboView(ILauncher):
exercise_id: str
display: str
internal_port: str
external_port: str
internal_port: int
external_port: int
height: int
width: int
running = False
threads = []
running: bool = False
threads: List[Any] = []

def run(self, callback):
DRI_PATH = os.path.join(
Expand Down