Skip to content

Commit

Permalink
Pylint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cssedev committed Nov 11, 2024
1 parent 240ad2d commit 56dd882
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions can/io/mf4.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"""

import abc
import heapq
import logging
from datetime import datetime
from hashlib import md5
Expand Down Expand Up @@ -292,8 +293,6 @@ def __init__(self, mdf: MDF4, group_index: int, start_timestamp: float, name: st
if str(channel.name).startswith(f"{self._name}."):
self._channel_names.append(channel.name)

return

def _get_data(self, current_offset: int) -> Signal:
# NOTE: asammdf suggests using select instead of get. Select seem to miss converting some
# channels which get does convert as expected.
Expand All @@ -311,8 +310,6 @@ def _get_data(self, current_offset: int) -> Signal:
def __iter__(self) -> Generator[Message, None, None]:
pass

pass


class MF4Reader(BinaryIOMessageReader):
"""
Expand All @@ -328,8 +325,6 @@ class _CANDataFrameIterator(FrameIterator):
def __init__(self, mdf: MDF4, group_index: int, start_timestamp: float):
super().__init__(mdf, group_index, start_timestamp, "CAN_DataFrame")

return

def __iter__(self) -> Generator[Message, None, None]:
for current_offset in range(
0,
Expand Down Expand Up @@ -365,17 +360,11 @@ def __iter__(self) -> Generator[Message, None, None]:

yield Message(**kv)

return None

pass

class _CANErrorFrameIterator(FrameIterator):

def __init__(self, mdf: MDF4, group_index: int, start_timestamp: float):
super().__init__(mdf, group_index, start_timestamp, "CAN_ErrorFrame")

return

def __iter__(self) -> Generator[Message, None, None]:
for current_offset in range(
0,
Expand Down Expand Up @@ -422,17 +411,11 @@ def __iter__(self) -> Generator[Message, None, None]:

yield Message(**kv)

return None

pass

class _CANRemoteFrameIterator(FrameIterator):

def __init__(self, mdf: MDF4, group_index: int, start_timestamp: float):
super().__init__(mdf, group_index, start_timestamp, "CAN_RemoteFrame")

return

def __iter__(self) -> Generator[Message, None, None]:
for current_offset in range(
0,
Expand Down Expand Up @@ -460,10 +443,6 @@ def __iter__(self) -> Generator[Message, None, None]:

yield Message(**kv)

return None

pass

def __init__(
self,
file: Union[StringPathLike, BinaryIO],
Expand Down Expand Up @@ -491,8 +470,6 @@ def __init__(
self._start_timestamp = self._mdf.header.start_time.timestamp()

def __iter__(self) -> Iterator[Message]:
import heapq

# To handle messages split over multiple channel groups, create a single iterator per
# channel group and merge these iterators into a single iterator using heapq.
iterators: List[FrameIterator] = []
Expand All @@ -512,7 +489,7 @@ def __iter__(self) -> Iterator[Message]:
if acquisition_source is None:
# No source information, skip
continue
elif not acquisition_source.source_type & Source.SOURCE_BUS:
if not acquisition_source.source_type & Source.SOURCE_BUS:
# Not a bus type (likely already covered by the channel group flag), skip
continue

Expand Down

0 comments on commit 56dd882

Please sign in to comment.