Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ruff and fix type error #19

Merged
merged 5 commits into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 21 additions & 19 deletions poetry.lock

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

9 changes: 6 additions & 3 deletions pymodbus_repl/server/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import inspect
import shutil
from collections import defaultdict
from typing import Optional
from typing import Dict, Optional

import click
from prompt_toolkit import PromptSession, print_formatted_text
Expand All @@ -17,6 +17,9 @@
from pymodbus_repl import __VERSION__ as repl_version
from pymodbus_repl.lib.completer import CmdCompleter
from pymodbus_repl.lib.helper import Command, style
from pymodbus_repl.lib.reactive import (
ReactiveServer,
dhoomakethu marked this conversation as resolved.
Show resolved Hide resolved
)


TITLE = r"""
Expand All @@ -37,7 +40,7 @@
)
COMMAND_ARGS = ["response_type", "error_code", "delay_by", "clear_after", "data_len"]
RESPONSE_TYPES = ["normal", "error", "delayed", "empty", "stray"]
COMMANDS = {
COMMANDS: Dict[str, Optional[Dict | Command]] = {
"manipulator": {
"response_type": None,
"error_code": None,
Expand Down Expand Up @@ -167,7 +170,7 @@ def _print_help():
_print_help()


def print_server_config(server: "ReactiveServer", print_server_context: bool = False, *extra) -> dict: # noqa
def print_server_config(server: ReactiveServer, print_server_context: bool = False, *extra):
"""Print server config."""
print_formatted_text()
print_formatted_text(HTML("<u>Server Configs:</u>"))
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ include = ["pymodbus_repl"]

[tool.poetry.group.dev.dependencies]
pymodbus = {git = "https://github.com/pymodbus-dev/pymodbus", rev = "dev"}
ruff = "^0.2.1"
ruff = "^0.5.6"
coverage = "^7.4.1"
pytest-xdist = "^3.5.0"
pytest-cov = "^4.1.0"
Expand Down