Skip to content

Commit fedd462

Browse files
committed
Fix linter errors
1 parent 0463040 commit fedd462

6 files changed

Lines changed: 5 additions & 11 deletions

File tree

plume/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
from plume.decoder.record_reader import RecordReader
2-
from plume.export.xdf_exporter import export_xdf_from_record
2+
from plume.export.xdf_exporter import export_xdf_from_record
3+
4+
__all__ = [RecordReader, export_xdf_from_record]

plume/decoder/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
from . import *

plume/decoder/frame/frame_data_decoder_registry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def decorator(cls: Type[FrameDataDecoder[T]]) -> Type[FrameDataDecoder[T]]:
2626
def get_frame_data_decoder(type: Type[T]):
2727
cls = _frame_data_decoder_registry.get(type)
2828
if cls is None:
29-
raise ValueError(f"No decoder found for {type}")
29+
raise KeyError(f"No decoder found for {type}")
3030
return cls
3131

3232

plume/decoder/frame/frame_decoder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def decode_frame(frame: Frame, frame_sample: FrameSample, time_ns: int):
7979

8080
try:
8181
frame_data_decoder = get_frame_data_decoder(type(parsed_payload))
82-
except:
82+
except KeyError:
8383
warn(
8484
f"Failed to get decoder for {parsed_payload.DESCRIPTOR.full_name}. Skipping."
8585
)

plume/decoder/lsl_stream_decoder.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ def _decode_stream_open(self, stream_open: StreamOpen) -> LslStreamInfo:
6060
version_str = root.findtext("version")
6161
created_at_str = root.findtext("created_at")
6262
uid_str = root.findtext("uid")
63-
session_id_str = root.findtext("session_id")
6463
hostname_str = root.findtext("hostname")
6564
v4address_str = root.findtext("v4address")
6665
v4data_port_str = root.findtext("v4data_port")

plume/proxy/collection.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ def __iter__(self):
4949

5050
def __contains__(self, item: T) -> bool:
5151
return item in self._items
52-
53-
def __str__(self) -> str:
54-
return str(self._items)
55-
56-
def __repr__(self) -> str:
57-
return repr(self._items)
5852

5953
def where(self: C, predicate: Callable[[T], bool]) -> C:
6054
return type(self)([item for item in self._items if predicate(item)])

0 commit comments

Comments
 (0)