You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by gc...@apache.org on 2023/03/10 00:16:32 UTC

[allura] branch gc/8502 updated: fixup! [#8502] ignoring long lines and updating ruff command with --config and --show-source flags

This is an automated email from the ASF dual-hosted git repository.

gcruz pushed a commit to branch gc/8502
in repository https://gitbox.apache.org/repos/asf/allura.git


The following commit(s) were added to refs/heads/gc/8502 by this push:
     new 0aa1c1f9a fixup! [#8502] ignoring long lines and updating ruff command with --config and --show-source flags
0aa1c1f9a is described below

commit 0aa1c1f9a4bc216a11ec25911109dfe2ec46c61c
Author: Guillermo Cruz <gu...@slashdotmedia.com>
AuthorDate: Thu Mar 9 18:16:14 2023 -0600

    fixup! [#8502] ignoring long lines and updating ruff command with --config and --show-source flags
---
 AlluraTest/alluratest/test_syntax.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/AlluraTest/alluratest/test_syntax.py b/AlluraTest/alluratest/test_syntax.py
index 662f8c692..da40861de 100644
--- a/AlluraTest/alluratest/test_syntax.py
+++ b/AlluraTest/alluratest/test_syntax.py
@@ -77,7 +77,7 @@ def run_linter(files):
         raise Exception('Custom Allura pylint errors found.')
 
 
-def run_pyflakes(files):
+def run_ruff(files):
     # skip some that aren't critical errors
     files = [f for f in files if '/migrations/' not in f]
     cmd = f"ruff check {' '.join(files)}  --config {BASE_PATH[0]}/ruff.toml --show-source"
@@ -112,9 +112,9 @@ def create_many_lint_methods():
         lint_test_method.__name__ = str(f'test_pylint_{i}')
         setattr(TestLinters, f'test_pylint_{i}', lint_test_method)
 
-        pyflake_test_method = lambda self, these_files=files: run_pyflakes(these_files)
-        pyflake_test_method.__name__ = str(f'test_pyflakes_{i}')
-        setattr(TestLinters, f'test_pyflakes_{i}', pyflake_test_method)
+        pyflake_test_method = lambda self, these_files=files: run_ruff(these_files)
+        pyflake_test_method.__name__ = str(f'test_ruff_{i}')
+        setattr(TestLinters, f'test_ruff_{i}', pyflake_test_method)
 
 
 create_many_lint_methods()