diff --git a/.github/scripts/build.sh b/.github/scripts/build.sh index 2d5fcd10..ed75b37b 100755 --- a/.github/scripts/build.sh +++ b/.github/scripts/build.sh @@ -39,6 +39,6 @@ if [[ ${PYTHON_VERSION} == 2.7 ]]; then fire/inspectutils_test.py \ fire/test_components_py3.py; elif [[ ${PYTHON_VERSION} == 3.7 ]]; then - pytype; + pytype -x fire/test_components_py3.py; fi diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b87d1f8a..b934b759 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [2.7, 3.4, 3.5, 3.7, 3.8, 3.9] + python-version: [2.7, 3.5, 3.7, 3.8, 3.9] steps: # Checkout the repo. diff --git a/fire/__main__.py b/fire/__main__.py index c7248e29..2ad217d6 100644 --- a/fire/__main__.py +++ b/fire/__main__.py @@ -80,7 +80,7 @@ def import_from_file_path(path): spec.loader.exec_module(module) # pytype: disable=attribute-error else: - import imp # pylint: disable=g-import-not-at-top,import-outside-toplevel + import imp # pylint: disable=g-import-not-at-top,import-outside-toplevel,deprecated-module module = imp.load_source(module_name, path) return module, module_name diff --git a/fire/custom_descriptions.py b/fire/custom_descriptions.py index 191e8b29..865a528e 100644 --- a/fire/custom_descriptions.py +++ b/fire/custom_descriptions.py @@ -137,7 +137,7 @@ def GetStringTypeDescription(obj, available_space, line_length): def GetSummary(obj, available_space, line_length): obj_type_name = type(obj).__name__ - if obj_type_name in CUSTOM_DESC_SUM_FN_DICT.keys(): + if obj_type_name in CUSTOM_DESC_SUM_FN_DICT: return CUSTOM_DESC_SUM_FN_DICT.get(obj_type_name)[0](obj, available_space, line_length) return None @@ -145,7 +145,7 @@ def GetSummary(obj, available_space, line_length): def GetDescription(obj, available_space, line_length): obj_type_name = type(obj).__name__ - if obj_type_name in CUSTOM_DESC_SUM_FN_DICT.keys(): + if obj_type_name in CUSTOM_DESC_SUM_FN_DICT: return CUSTOM_DESC_SUM_FN_DICT.get(obj_type_name)[1](obj, available_space, line_length) return None diff --git a/fire/main_test.py b/fire/main_test.py index 41699ac6..a0184620 100644 --- a/fire/main_test.py +++ b/fire/main_test.py @@ -44,11 +44,11 @@ class MainModuleFileTest(testutils.BaseTestCase): def setUp(self): super(MainModuleFileTest, self).setUp() - self.file = tempfile.NamedTemporaryFile(suffix='.py') + self.file = tempfile.NamedTemporaryFile(suffix='.py') # pylint: disable=consider-using-with self.file.write(b'class Foo:\n def double(self, n):\n return 2 * n\n') self.file.flush() - self.file2 = tempfile.NamedTemporaryFile() + self.file2 = tempfile.NamedTemporaryFile() # pylint: disable=consider-using-with def testFileNameFire(self): # Confirm that the file is correctly imported and doubles the number. diff --git a/pylintrc b/pylintrc index 1b1c5cc2..fa054fb5 100644 --- a/pylintrc +++ b/pylintrc @@ -32,7 +32,7 @@ enable=indexing-exception,old-raise-syntax # Disable the message, report, category or checker with the given id(s). You # can either give multiple identifier separated by comma (,) or put this option # multiple time. -disable=design,similarities,no-self-use,attribute-defined-outside-init,locally-disabled,star-args,pointless-except,bad-option-value,global-statement,fixme,suppressed-message,useless-suppression,locally-enabled,file-ignored,wrong-import-order,useless-object-inheritance,no-else-return,super-with-arguments,raise-missing-from +disable=design,similarities,no-self-use,attribute-defined-outside-init,locally-disabled,star-args,pointless-except,bad-option-value,global-statement,fixme,suppressed-message,useless-suppression,locally-enabled,file-ignored,wrong-import-order,useless-object-inheritance,no-else-return,super-with-arguments,raise-missing-from,consider-using-f-string,unspecified-encoding [REPORTS] diff --git a/setup.py b/setup.py index 1cc64a07..e1efe1ab 100644 --- a/setup.py +++ b/setup.py @@ -66,7 +66,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7',