From 1d057e0c9b732f8990939ecc92bce041df2d369b Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Tue, 14 Feb 2023 15:11:30 -0700 Subject: [PATCH] Old pylint version not compatible with python 3.11 Deprecated github action to use 3.10 instead of 3.11, and then updated code_consistency.py to account for new pylint warning about formatting u-strings --- .github/workflows/run_test_suite.yml | 2 +- MARBL_tools/code_consistency.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run_test_suite.yml b/.github/workflows/run_test_suite.yml index 22abe3d6..016c6952 100644 --- a/.github/workflows/run_test_suite.yml +++ b/.github/workflows/run_test_suite.yml @@ -7,7 +7,7 @@ jobs: strategy: matrix: python-version: - - 3.11 + - '3.10' steps: - uses: actions/checkout@v3 diff --git a/MARBL_tools/code_consistency.py b/MARBL_tools/code_consistency.py index 83a6a54f..5fdc9387 100755 --- a/MARBL_tools/code_consistency.py +++ b/MARBL_tools/code_consistency.py @@ -9,7 +9,7 @@ import logging from collections import deque # Faster pop / append than standard lists from collections import OrderedDict -UNIBLOCK = u"\u2588" +UNIBLOCK = u"\u2588" # pylint: disable=redundant-u-string-prefix ############## @@ -218,8 +218,8 @@ def check_r8_settings(self, file_and_line, line, comment_char="!"): else: MARBL_ROOT = os.path.join(SCRIPT_DIR, '..') - fortran_files = [] # pylint: disable=C0103 - python_files = [] # pylint: disable=C0103 + fortran_files = [] + python_files = [] for root, dirs, files in os.walk(MARBL_ROOT): for thisfile in files: if thisfile.endswith(".F90"): @@ -231,7 +231,7 @@ def check_r8_settings(self, file_and_line, line, comment_char="!"): logging.basicConfig(format='%(message)s', level=logging.DEBUG) LOGGER = logging.getLogger(__name__) - Tests = ConsistencyTestClass() # pylint: disable=C0103 + Tests = ConsistencyTestClass() # Fortran error checks LOGGER.info("Check Fortran files for coding standard violations:")