Skip to content

Commit

Permalink
Merge pull request #7 from pymodbus-dev/ruff
Browse files Browse the repository at this point in the history
re-order imports with ruff
  • Loading branch information
dhoomakethu authored Feb 21, 2024
2 parents dc3ae8c + e1bd30e commit 7b7d2f0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
1 change: 0 additions & 1 deletion pymodbus_repl/client/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from prompt_toolkit import print_formatted_text
from prompt_toolkit.formatted_text import HTML, PygmentsTokens
from pygments.lexers.data import JsonLexer

from pymodbus.payload import BinaryPayloadDecoder, Endian


Expand Down
14 changes: 7 additions & 7 deletions pymodbus_repl/client/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@
from prompt_toolkit.lexers import PygmentsLexer
from prompt_toolkit.styles import Style
from pygments.lexers.python import PythonLexer

from pymodbus import __version__ as pymodbus_version
from pymodbus.exceptions import ParameterException
from pymodbus_repl.client.completer import (
CmdCompleter,
has_selected_completion,
)
from pymodbus_repl.client.helper import CLIENT_ATTRIBUTES, Result
from pymodbus_repl.client.mclient import ModbusSerialClient, ModbusTcpClient
from pymodbus.transaction import (
ModbusAsciiFramer,
ModbusBinaryFramer,
ModbusRtuFramer,
ModbusSocketFramer,
)

from pymodbus_repl.client.completer import (
CmdCompleter,
has_selected_completion,
)
from pymodbus_repl.client.helper import CLIENT_ATTRIBUTES, Result
from pymodbus_repl.client.mclient import ModbusSerialClient, ModbusTcpClient


_logger = logging.getLogger()

Expand Down
4 changes: 2 additions & 2 deletions pymodbus_repl/server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
from pathlib import Path

import typer

from pymodbus import pymodbus_apply_logging_config
from pymodbus.framer.socket_framer import ModbusSocketFramer
from pymodbus.logging import Log
from pymodbus_repl.server.cli import run_repl
from pymodbus.server.reactive.default_config import DEFAULT_CONFIG
from pymodbus.server.reactive.main import (
DEFAULT_FRAMER,
ReactiveServer,
)

from pymodbus_repl.server.cli import run_repl


CANCELLED_ERROR = asyncio.exceptions.CancelledError
CONTEXT_SETTING = {"allow_extra_args": True, "ignore_unknown_options": True}
Expand Down
Empty file removed tests/__init__.py
Empty file.
3 changes: 2 additions & 1 deletion tests/test_repl_client.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
"""Test client sync."""
from contextlib import suppress

from pymodbus.repl.client.main import _process_args
from pymodbus.server.reactive.default_config import DEFAULT_CONFIG

from pymodbus_repl.client.main import _process_args


def test_repl_default_config():
"""Test default config can be loaded."""
Expand Down

0 comments on commit 7b7d2f0

Please sign in to comment.