Skip to content

Commit

Permalink
Merge pull request #53 from JdeRobot/issue-52
Browse files Browse the repository at this point in the history
Fix pydantic missing type annotations
  • Loading branch information
ango1994 authored Jul 18, 2023
2 parents 807b019 + 13f7886 commit 19c7a4b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
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

0 comments on commit 19c7a4b

Please sign in to comment.