Skip to content

Commit 18aa463

Browse files
authored
Flake8 clean pymodbus. (#871)
1 parent e861d72 commit 18aa463

File tree

163 files changed

+6232
-5893
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+6232
-5893
lines changed

.flake8

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# flake8 configuration.
2+
[flake8]
3+
exclude = .tox,.git,__pycache__
4+
ignore = D211,D400,E251,E731,W503
5+
max-line-length = 120

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ jobs:
191191
# continue_on_error: true
192192
- name: flake8
193193
tox: flake8
194-
continue_on_error: true
194+
# continue_on_error: true
195195
- name: Docs
196196
tox: docs
197197
os:

doc/api/doxygen/build.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
#!/usr/bin/env python3
2-
""" Doxygen API Builder
3-
---------------------
4-
"""
2+
"""Doxygen API Builder."""
53
import os
64
import shutil
75

6+
87
def is_exe(path):
9-
""" Returns if the program is executable
8+
"""Return if the program is executable.
9+
1010
:param path: The path to the file
1111
:return: True if it is, False otherwise
1212
"""
1313
return os.path.exists(path) and os.access(path, os.X_OK)
1414

15+
1516
def which(program):
16-
""" Check to see if an executable exists
17+
"""Check to see if an executable exists.
18+
1719
:param program: The program to check for
1820
:return: The full path of the executable or None if not found
1921
"""
@@ -28,9 +30,11 @@ def which(program):
2830
return exe_file
2931
return None
3032

33+
3134
if which('doxygen') is not None:
3235
print("Building Doxygen API Documentation")
33-
os.system("doxygen .doxygen") #nosec
36+
os.system("doxygen .doxygen") # nosec
3437
if os.path.exists('../../../build'):
3538
shutil.move("html", "../../../build/doxygen")
36-
else: print("Doxygen not available...not building")
39+
else:
40+
print("Doxygen not available...not building")

doc/api/epydoc/build.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/usr/bin/env python3
2-
""" Epydoc API Runner
3-
------------------
2+
"""Epydoc API Runner.
43
54
Using pkg_resources, we attempt to see if epydoc is installed,
65
if so, we use its cli program to compile the documents
@@ -14,7 +13,7 @@
1413
try:
1514
pkg_resources.require("epydoc")
1615

17-
from epydoc.cli import cli # pylint: disable=import-error
16+
from epydoc.cli import cli # pylint: disable=import-error
1817
sys.argv = """epydoc.py pymodbus
1918
--html --simple-term --quiet
2019
--include-log
@@ -25,7 +24,7 @@
2524
--exclude=tests
2625
--output=html/
2726
""".split()
28-
#bugs in trunk for --docformat=restructuredtext
27+
# bugs in trunk for --docformat=restructuredtext
2928

3029
if not os.path.exists("./html"):
3130
os.mkdir("./html")
@@ -35,6 +34,6 @@
3534

3635
if os.path.exists('../../../build'):
3736
shutil.move("html", "../../../build/epydoc")
38-
except Exception: # pylint: disable=broad-except
37+
except Exception: # pylint: disable=broad-except
3938
traceback.print_exc(file=sys.stdout)
40-
print( "Epydoc not available...not building")
39+
print("Epydoc not available...not building")

0 commit comments

Comments
 (0)