fix some Pylint lines-too-long warnings
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 24 Apr 2021 16:59:02 +0000 (09:59 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 1 May 2021 00:35:16 +0000 (17:35 -0700)
ci/generate-configuration-table.py
gen_version.py
rtest/rtest.py
tests/regression_tests/large/test_large_graphs.py
tests/regression_tests/regression_test_helpers.py
tests/regression_tests/shapes/test_shapes.py

index fcbcf2ac4cdd4cac93023793a24cbfc32a655eb2..751087f4af05d309afe7a7f16fecfbc8abae3f1f 100755 (executable)
@@ -108,7 +108,8 @@ def main():
     print(f"{indent}<style>")
     indent += "  "
     print(f"{indent}table {{text-align: left; white-space: nowrap; position: relative;}}")
-    print(f"{indent}thead tr th {{padding-right: 1em; padding-bottom: 5px; position: sticky; top: 0px;  background-color: white;}}")
+    print(f"{indent}thead tr th {{padding-right: 1em; padding-bottom: 5px; "
+          "position: sticky; top: 0px;  background-color: white;}")
     print(f"{indent}td, th {{padding-left: 1.5em;}}")
     indent = indent[:-2]
     print(f"{indent}</style>")
index 4b1a6c473c257dd6357dd76bee3390002d1098e9..7f9226f83d5b9fffe7117548c934a09d9de45165 100644 (file)
@@ -105,7 +105,8 @@ if not patch_version.isnumeric() or args.date_format:
         "%Y-%m-%d %H:%M:%S",
     ).strftime(date_format)
   except (subprocess.CalledProcessError, FileNotFoundError):
-    print("Warning: build not started in a Git clone, or Git is not installed: setting version date to 0.", file=sys.stderr)
+    sys.stderr.write("Warning: build not started in a Git clone, or Git is not "
+                     "installed: setting version date to 0.\n")
     committer_date = "0"
 
 if not patch_version.isnumeric():
index 0ca49330975f48caf9776f75b1587af67ef7352f..31c74ce587f72bb231d5fbdcf0c117e67b6c8250 100755 (executable)
@@ -297,7 +297,8 @@ def doTest(TEST):
     elif os.path.exists(os.path.join(REFDIR, OUTFILE)):
       doDiff(OUTFILE, OUTDIR, REFDIR, TESTNAME, i, SUBTEST["FMT"])
     else:
-      print(f"Test {TESTNAME}:{i} : == No file {REFDIR}/{OUTFILE} for comparison ==", file=sys.stderr)
+      sys.stderr.write(f"Test {TESTNAME}:{i} : == No file {REFDIR}/{OUTFILE} "
+                       "for comparison ==\n")
 
   # clear TESTTYPES
   TESTTYPES = {}
index 9bd85a2fb46af8beda55a39386b5e148d3ce72ea..ae42c30da6d37125a5c40db518d15c52e3ec5eb7 100644 (file)
@@ -6,7 +6,9 @@ import platform
 \r
 \r
 class TestLargeGraphs():\r
-       @pytest.mark.skipif(platform.system() == "Windows" and platform.architecture()[0] == "32bit", reason="https://gitlab.com/graphviz/graphviz/-/issues/1710")\r
+       @pytest.mark.skipif(platform.system() == "Windows" and\r
+                      platform.architecture()[0] == "32bit",\r
+                      reason="https://gitlab.com/graphviz/graphviz/-/issues/1710")\r
        def test_long_chain(self):\r
                """\r
                This test will fail on 32bit Windows machine if compiled with stack size < 16MB.\r
index d195f5d34bf09d8106b5d0b1b201e63f75b32ab8..e63908edd2469755be3393ec11bee0cefdd0408d 100644 (file)
@@ -13,7 +13,9 @@ def compare_graphs(name, output_type):
     with open(filename_output) as output_file:
       reference = reference_file.readlines()
       output = output_file.readlines()
-      diff_generator = difflib.context_diff(output, reference, str(filename_output), str(filename_reference))
+      diff_generator = difflib.context_diff(output, reference,
+                                            str(filename_output),
+                                            str(filename_reference))
 
       # if diff contains at least one line, the files are different
       diff = []
index 9de667866e4be506fd87b0d2f52ef7abdf3c8d57..734cdb3392cd628199348e9d97ccb3abe09038bd 100644 (file)
@@ -110,7 +110,8 @@ def generate_shape_graph(shape, output_type):
 
 class Test_File():
   @pytest.mark.parametrize(
-      "shape,output_type", [(shape, output_type) for shape in shapes for output_type in output_types]
+      "shape,output_type", [(shape, output_type) for shape in shapes
+                            for output_type in output_types]
   )
   def test_shape(self, shape, output_type):
     os.chdir(Path(__file__).resolve().parent)