Skip to content

Commit

Permalink
enable mypy --check-untyped-defs (#2096)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrudd2 authored Mar 7, 2024
1 parent 504af27 commit 27b2915
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pymodbus/diag_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ def execute(self, *args):
:returns: The initialized response message
"""
char = (self.message & 0xFF00) >> 8
char = (self.message & 0xFF00) >> 8 # type: ignore[operator]
_MCB._setDelimiter(char) # pylint: disable=protected-access
return ChangeAsciiInputDelimiterResponse(self.message)

Expand Down
2 changes: 1 addition & 1 deletion pymodbus/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def execute(self, request): # noqa: C901
"/Unable to decode response"
)
response = ModbusIOException(
last_exception, request.function_code
last_exception, request.function_code # type: ignore[assignment]
)
self.client.close()
if hasattr(self.client, "state"):
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ strict_concatenate = false
disallow_subclassing_any = true
disallow_untyped_decorators = true
warn_unreachable = true
check_untyped_defs = true

[tool.distutils]
bdist_wheel = {}
Expand Down

0 comments on commit 27b2915

Please sign in to comment.