Skip to content
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
3 changes: 0 additions & 3 deletions TODO_pylint
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
Resolve:
noqa

pylint general:
see .pylintrc [MESSAGES CONTROL]

Expand Down
8 changes: 4 additions & 4 deletions doc/api/pydoc/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ def classify_class_attrs(cls):
class DefaultFormatter(pydoc.HTMLDoc):
"""Default formatter."""

def docmodule( # noqa: C901
def docmodule(
self, object, name=None, mod=None, packageContext=None, *ignored
): # noqa: C901
):
"""Produce HTML documentation for a module object."""
my_name = object.__name__ # ignore the passed-in name
parts = split(my_name, ".")
Expand Down Expand Up @@ -197,7 +197,7 @@ def docmodule( # noqa: C901
# FIX classlist = map(lambda (key, value): value, classes)
contents = [
self.formattree(
inspect.getclasstree(classlist, 1), my_name # noqa: F821
inspect.getclasstree(classlist, 1), my_name
)
]
for key, value in classes:
Expand Down Expand Up @@ -271,7 +271,7 @@ def moduleSection(self, object, packageContext):
items.append(
self.modpkglink((modname, name, ispackage, isshadowed))
)
except: # noqa: E722
except:
items.append(
self.modpkglink((modname, name, ispackage, isshadowed))
)
Expand Down
2 changes: 1 addition & 1 deletion doc/api/pydoctor/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@

if os.path.exists("../../../build"):
shutil.move("html", "../../../build/pydoctor")
except: # noqa: E722 pylint: disable=bare-except
except: # pylint: disable=bare-except
print("Pydoctor unavailable...not building")
4 changes: 2 additions & 2 deletions pymodbus/repl/client/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Pymodbus REPL Entry point."""
# pylint: disable=anomalous-backslash-in-string
# flake8: noqa: W605
# flake8: noqa
import logging
import pathlib
import sys
Expand Down Expand Up @@ -169,7 +169,7 @@ def _parse_val(arg_name, val):
return kwargs, execute


def cli(client): # noqa: C901 pylint: disable=too-complex
def cli(client): # pylint: disable=too-complex
"""Run client definition."""
use_keys = KeyBindings()
history_file = pathlib.Path.home().joinpath(".pymodhis")
Expand Down
6 changes: 3 additions & 3 deletions pymodbus/server/async_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def _send_(self, data):
# --------------------------------------------------------------------------- #


class ModbusTcpServer: # pylint: disable=too-many-instance-attributes
class ModbusTcpServer:
"""A modbus threaded tcp socket server.

We inherit and overload the socket server so that we
Expand Down Expand Up @@ -659,7 +659,7 @@ def __init__( # pylint: disable=too-many-arguments
self.factory_parms["ssl"] = self.sslctx


class ModbusUdpServer: # pylint: disable=too-many-instance-attributes
class ModbusUdpServer:
"""A modbus threaded udp socket server.

We inherit and overload the socket server so that we
Expand Down Expand Up @@ -762,7 +762,7 @@ async def server_close(self):
self.protocol = None


class ModbusSerialServer: # pylint: disable=too-many-instance-attributes
class ModbusSerialServer:
"""A modbus threaded serial socket server.

We inherit and overload the socket server so that we
Expand Down
8 changes: 4 additions & 4 deletions setup_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,18 @@ def _try_pyflakes(self):

def _try_pychecker(self):
try:
import pychecker # noqa: F401
import pychecker
sys.argv = """pychecker pymodbus/*.py""".split()
main() # noqa: F821
main()
return True
except Exception:
return False

def _try_pylint(self):
try:
import pylint # noqa: F401
import pylint
sys.argv = """pylint pymodbus/*.py""".split()
main() # noqa: F821
main()
return True
except Exception:
return False
Expand Down
4 changes: 1 addition & 3 deletions test/test_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,6 @@ def test_modbus_plus_statistics_helpers(self):
[0],
[0, 0, 0, 0, 0, 0, 0, 0],
]
stats_summary = [ # noqa: C416 pylint: disable=unnecessary-comprehension
x for x in statistics.summary()
]
stats_summary = list(statistics.summary())
self.assertEqual(sorted(summary), sorted(stats_summary))
self.assertEqual(0x00, sum(sum(value[1]) for value in statistics))
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ setenv =
deps = -r requirements.txt
ignore_errors = false
commands =
pylint --recursive=y doc examples pymodbus test
pylint --recursive=y examples pymodbus test

[testenv:codespell]
deps = -r requirements.txt
ignore_errors = false
commands =
codespell --ignore-words-list asend --skip="_build" doc examples pymodbus test
codespell --ignore-words-list asend --skip="_build" examples pymodbus test

[testenv:isort]
deps = -r requirements.txt
Expand All @@ -46,13 +46,13 @@ commands =
deps = -r requirements.txt
ignore_errors = false
commands =
bandit -r -c bandit.yaml doc/ examples/ pymodbus/ test/
bandit -r -c bandit.yaml examples/ pymodbus/ test/

[testenv:flake8]
deps = -r requirements.txt
ignore_errors = false
commands =
flake8 doc/ examples/ pymodbus/ test/
flake8 examples/ pymodbus/ test/

[testenv:black]
deps = -r requirements.txt
Expand Down