Skip to content

Commit

Permalink
Fix typing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tcamise-gpsw committed Jul 17, 2024
1 parent 1d0863c commit c3ebaf7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def ble_proto_command(
request_proto (type[types.Protobuf]): the action ID that will be in the response
response_proto (type[types.Protobuf]): protobuf used to parse received bytestream
parser (Parser | None): Response parser to transform received Protobuf bytes. Defaults to None.
additional_matching_ids ( set[ActionId | CmdId] | None): Other action ID's to share this parser. This is used,
additional_matching_ids (set[ActionId | CmdId] | None): Other action ID's to share this parser. This is used,
for example, if a notification shares the same ID as the synchronous response. Defaults to None.
Returns:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ async def webcam_start(
"""Start the webcam.
Args:
resolution ( Params.WebcamResolution | None): resolution to use. If not set, camera default will be used.
resolution (Params.WebcamResolution | None): resolution to use. If not set, camera default will be used.
fov (Params.WebcamFOV | None): field of view to use. If not set, camera default will be used.
port (int | None): port to use for streaming. If not set, camera default of 8554 will be used.
protocol (Params.WebcamProtocol | None): streaming protocol to use. If not set, camera default of TS will
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import logging
import re
from pathlib import Path
from typing import Generic, Optional, Pattern, Union
from typing import Generic, Optional, Pattern

from open_gopro.ble import BleUUID
from open_gopro.exceptions import ConnectFailed, FailedToFindDevice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import re
from abc import ABC, abstractmethod
from pathlib import Path
from typing import Any, Generator, Generic, Pattern, Protocol, TypeVar
from typing import Any, Generic, Iterator, Pattern, Protocol, TypeVar
from urllib.parse import urlencode

from construct import Bit, BitsInteger, BitStruct, Const, Construct, Padding
Expand Down Expand Up @@ -261,7 +261,7 @@ async def _read_ble_characteristic(

# TODO this should be somewhere else
@classmethod
def _fragment(cls, data: bytes) -> Generator[bytes]:
def _fragment(cls, data: bytes) -> Iterator[bytes]:
"""Fragment data in to MAX_BLE_PKT_LEN length packets
Args:
Expand All @@ -271,7 +271,7 @@ def _fragment(cls, data: bytes) -> Generator[bytes]:
ValueError: data is too long
Yields:
Generator[bytes]: Generator of packets as bytes
bytes: packet as bytes
"""
MAX_BLE_PKT_LEN = 20

Expand Down

0 comments on commit c3ebaf7

Please sign in to comment.