Skip to content

Commit c183d24

Browse files
committed
v0.5.7
1 parent 9db8c41 commit c183d24

7 files changed

Lines changed: 16 additions & 16 deletions

File tree

plexus/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@
2828
from plexus.config import load_config, save_config
2929
from plexus.typed_commands import param, CommandRegistry
3030

31-
__version__ = "0.5.6"
31+
__version__ = "0.5.7"
3232
__all__ = ["Plexus", "param", "CommandRegistry", "load_config", "save_config"]

plexus/adapters/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def connect(self) -> bool:
3939
# Connect to your protocol
4040
return True
4141
42-
def poll(self) -> list[Metric]:
42+
def poll(self) -> "List[Metric]":
4343
# Read data and return metrics
4444
return [Metric("sensor.temp", 72.5)]
4545

plexus/adapters/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def disconnect(self) -> None:
3131
if self._serial:
3232
self._serial.close()
3333
34-
def poll(self) -> list[Metric]:
34+
def poll(self) -> "List[Metric]":
3535
line = self._serial.readline().decode().strip()
3636
# Parse your protocol format
3737
metric, value = line.split(":")

plexus/commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import os
2121
import shlex
2222
import subprocess
23-
from typing import Optional, Callable, List
23+
from typing import Optional, Callable, List, Tuple
2424

2525
logger = logging.getLogger(__name__)
2626

@@ -62,7 +62,7 @@ def __init__(
6262
self.on_status = on_status or (lambda x: None)
6363
self._current_process: Optional[subprocess.Popen] = None
6464

65-
def is_command_allowed(self, command: str) -> tuple[bool, str]:
65+
def is_command_allowed(self, command: str) -> Tuple[bool, str]:
6666
"""Check if a command is allowed by the allowlist/denylist policy.
6767
6868
Returns (allowed, reason) tuple.

plexus/detect.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class SystemInfo:
101101
# Existing Detection Functions
102102
# ─────────────────────────────────────────────────────────────────────────────
103103

104-
def detect_sensors(bus: int = 1) -> tuple[Optional["SensorHub"], list]:
104+
def detect_sensors(bus: int = 1) -> Tuple[Optional["SensorHub"], List]:
105105
"""Detect I2C sensors and create a SensorHub.
106106
107107
Returns:
@@ -121,7 +121,7 @@ def detect_sensors(bus: int = 1) -> tuple[Optional["SensorHub"], list]:
121121
return None, []
122122

123123

124-
def detect_cameras() -> tuple[Optional["CameraHub"], list]:
124+
def detect_cameras() -> Tuple[Optional["CameraHub"], List]:
125125
"""Detect connected cameras and create a CameraHub.
126126
127127
Returns:
@@ -141,7 +141,7 @@ def detect_cameras() -> tuple[Optional["CameraHub"], list]:
141141
return None, []
142142

143143

144-
def detect_can() -> tuple[Optional[list["DetectedCAN"]], list["DetectedCAN"], list["DetectedCAN"]]:
144+
def detect_can() -> Tuple[Optional[List["DetectedCAN"]], List["DetectedCAN"], List["DetectedCAN"]]:
145145
"""Detect CAN interfaces.
146146
147147
Returns:
@@ -159,7 +159,7 @@ def detect_can() -> tuple[Optional[list["DetectedCAN"]], list["DetectedCAN"], li
159159
return None, [], []
160160

161161

162-
def detect_mavlink() -> list["DetectedMAVLink"]:
162+
def detect_mavlink() -> List["DetectedMAVLink"]:
163163
"""Detect MAVLink connections (UDP, TCP, serial).
164164
165165
Returns:

plexus/streaming.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ def __init__(
4747
self.on_status = on_status or (lambda x: None)
4848
self.persist_fn = persist_fn
4949

50-
self._active_streams: dict[str, asyncio.Task] = {}
51-
self._active_camera_streams: dict[str, asyncio.Task] = {}
52-
self._active_can_streams: dict[str, asyncio.Task] = {}
53-
self._can_instances: dict[str, Any] = {} # channel -> CANAdapter
54-
self._active_mavlink_streams: dict[str, asyncio.Task] = {}
55-
self._mavlink_instances: dict[str, Any] = {} # conn_string -> MAVLinkAdapter
50+
self._active_streams: Dict[str, asyncio.Task] = {}
51+
self._active_camera_streams: Dict[str, asyncio.Task] = {}
52+
self._active_can_streams: Dict[str, asyncio.Task] = {}
53+
self._can_instances: Dict[str, Any] = {} # channel -> CANAdapter
54+
self._active_mavlink_streams: Dict[str, asyncio.Task] = {}
55+
self._mavlink_instances: Dict[str, Any] = {} # conn_string -> MAVLinkAdapter
5656
self._recording: bool = False
5757

5858
# =========================================================================

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "plexus-agent"
7-
version = "0.5.6"
7+
version = "0.5.7"
88
description = "Send sensor data to Plexus in one line of code"
99
readme = "README.md"
1010
license = "Apache-2.0"

0 commit comments

Comments
 (0)