Skip to content

Commit

Permalink
PyLint
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-kirienko committed Jan 10, 2024
1 parent 1377cd4 commit ed458f6
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions .idea/dictionaries/pavel.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pycyphal/dsdl/_import_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

def root_namespace_from_module_name(module_name: str) -> str:
"""
Tranlates python module name to DSDL root namespace.
Translates python module name to DSDL root namespace.
This handles special case where root namespace is a python keyword by removing trailing underscore.
"""
if module_name.endswith("_") and keyword.iskeyword(module_name[-1]):
Expand Down
2 changes: 1 addition & 1 deletion pycyphal/dsdl/_support_wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
autogenerated code unless explicitly requested by the application.
"""

from typing import TypeVar, Type, Sequence, cast, Any, Iterable, Optional, Dict
from typing import TypeVar, Type, Sequence, Any, Iterable, Optional, Dict
import pydsdl


Expand Down
1 change: 1 addition & 0 deletions pycyphal/transport/can/media/socketcan/_socketcan.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (c) 2019 OpenCyphal
# This software is distributed under the terms of the MIT License.
# Author: Pavel Kirienko <[email protected]>
# pylint: disable=duplicate-code

import enum
import time
Expand Down
3 changes: 2 additions & 1 deletion pycyphal/transport/can/media/socketcand/_socketcand.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ def _transmit_thread_worker(self) -> None:
tx.loop.call_soon_threadsafe(partial(tx.future.set_exception, ex))
except Exception as ex:
_logger.critical(
"Unhandled exception in transmit thread, transmission thread stopped and transmission is no longer possible: %s",
"Unhandled exception in transmit thread, "
"transmission thread stopped and transmission is no longer possible: %s",
ex,
exc_info=True,
)
Expand Down
5 changes: 3 additions & 2 deletions tests/transport/can/media/_socketcand.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Copyright (c) 2023 OpenCyphal
# This software is distributed under the terms of the MIT License.
# pylint: disable=protected-access,duplicate-code

import sys
import typing
Expand All @@ -9,7 +10,7 @@
import pytest

from pycyphal.transport import Timestamp
from pycyphal.transport.can.media import Envelope, DataFrame, FrameFormat, FilterConfiguration
from pycyphal.transport.can.media import Envelope, DataFrame, FrameFormat
from pycyphal.transport.can.media.socketcand import SocketcandMedia

if sys.platform != "linux": # pragma: no cover
Expand All @@ -23,7 +24,7 @@ def _start_socketcand() -> typing.Generator[None, None, None]:
# starting a socketcand daemon in background
cmd = ["socketcand", "-i", "vcan0", "-l", "lo", "-p", "29536"]

socketcand = subprocess.Popen(
socketcand = subprocess.Popen( # pylint: disable=consider-using-with
cmd,
encoding="utf8",
stdout=subprocess.PIPE,
Expand Down

0 comments on commit ed458f6

Please sign in to comment.