Skip to content

Commit 52a618f

Browse files
authored
Replace Union type with pipe (#90)
* Replace Union type with pipe * Update python requirement to be 3.10
1 parent e6978b8 commit 52a618f

20 files changed

+111
-133
lines changed

Pipfile.lock

Lines changed: 27 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Here are some of the main features of `pymavswarm`:
2121

2222
## Dependencies
2323

24-
`pymavswarm` depends on Python versions 3.8 or greater. Ensure that this
24+
`pymavswarm` depends on Python versions 3.10 or greater. Ensure that this
2525
dependency is met prior to installation.
2626

2727
## Installation

examples/subclass_mavswarm.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import time
2121
from argparse import ArgumentParser
2222
from concurrent.futures import Future
23-
from typing import Any, Union
23+
from typing import Any
2424

2525
import monotonic
2626

@@ -46,7 +46,7 @@ def __init__(self, log_level: int = logging.INFO) -> None:
4646

4747
def fun_command(
4848
self,
49-
agent_ids: Union[AgentID, list[AgentID]] | None = None,
49+
agent_ids: AgentID | list[AgentID] | None = None,
5050
retry: bool = False,
5151
message_timeout: float = 2.5,
5252
ack_timeout: float = 0.5,
@@ -55,7 +55,7 @@ def fun_command(
5555
Send a fun command to the specified agents.
5656
5757
:param agent_ids: optional list of target agent IDs, defaults to None
58-
:type agent_ids: Optional[Union[AgentID, list[AgentID]]],
58+
:type agent_ids: AgentID | list[AgentID] | None,
5959
optional
6060
:param retry: retry sending the fun command to an agent on failure, defaults to
6161
False

pymavswarm/handlers/receivers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def _receive_message(self, message: str) -> Callable:
8080
* URL: https://github.com/dronekit/dronekit-python
8181
8282
:param message: The type of message to watch for
83-
:type message: Union[list, str]
83+
:type message: list | str
8484
:return: decorator
8585
:rtype: Callable
8686
"""

0 commit comments

Comments
 (0)