From 92437c9af72b75fbccb451da95f85dbbf0c3f0da Mon Sep 17 00:00:00 2001 From: Ashley Whetter Date: Sat, 8 Jul 2023 10:38:24 -0700 Subject: [PATCH] Removed old pylint pragmas --- .pre-commit-config.yaml | 15 --------------- autoapi/directives.py | 4 ++-- autoapi/documenters.py | 4 +--- autoapi/extension.py | 4 ++-- autoapi/inheritance_diagrams.py | 2 +- autoapi/mappers/base.py | 1 - autoapi/mappers/python/astroid_utils.py | 5 ++--- autoapi/mappers/python/parser.py | 2 +- docs/changes/+5819ffe5.misc | 1 + 9 files changed, 10 insertions(+), 28 deletions(-) delete mode 100644 .pre-commit-config.yaml create mode 100644 docs/changes/+5819ffe5.misc diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index 76bed86..0000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,15 +0,0 @@ -repos: -- repo: https://github.com/psf/black - rev: 19.10b0 - hooks: - - id: black - language_version: python3 -- repo: https://github.com/PyCQA/pylint - rev: 'pylint-2.5.3' - hooks: - - id: pylint -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.1.0 - hooks: - - id: trailing-whitespace - - id: end-of-file-fixer diff --git a/autoapi/directives.py b/autoapi/directives.py index 717cf5f..ee5e3ec 100644 --- a/autoapi/directives.py +++ b/autoapi/directives.py @@ -9,7 +9,7 @@ from sphinx.util.nodes import nested_parse_with_titles from .mappers.python.objects import PythonFunction -class AutoapiSummary(Autosummary): # pylint: disable=too-few-public-methods +class AutoapiSummary(Autosummary): """A version of autosummary that uses static analysis.""" def get_items(self, names): @@ -40,7 +40,7 @@ class AutoapiSummary(Autosummary): # pylint: disable=too-few-public-methods return items -class NestedParse(Directive): # pylint: disable=too-few-public-methods +class NestedParse(Directive): """Nested parsing to remove the first heading of included rST diff --git a/autoapi/documenters.py b/autoapi/documenters.py index f8ed706..adf27ec 100644 --- a/autoapi/documenters.py +++ b/autoapi/documenters.py @@ -12,8 +12,6 @@ from .mappers.python import ( PythonException, ) -# pylint: disable=attribute-defined-outside-init,unused-argument - class AutoapiDocumenter(autodoc.Documenter): def get_attr(self, obj, name, *defargs): @@ -82,7 +80,7 @@ class AutoapiDocumenter(autodoc.Documenter): return False, children -class _AutoapiDocstringSignatureMixin: # pylint: disable=too-few-public-methods +class _AutoapiDocstringSignatureMixin: def format_signature(self, **kwargs): # Set "manual" attributes at the last possible moment. # This is to let a manual entry or docstring searching happen first, diff --git a/autoapi/extension.py b/autoapi/extension.py index 8b77a11..8fa740a 100644 --- a/autoapi/extension.py +++ b/autoapi/extension.py @@ -60,7 +60,7 @@ def _normalise_autoapi_dirs(autoapi_dirs, srcdir): return normalised_dirs -def run_autoapi(app): # pylint: disable=too-many-branches +def run_autoapi(app): """Load AutoAPI data from the filesystem.""" if not app.config.autoapi_dirs: raise ExtensionError("You must configure an autoapi_dirs setting") @@ -143,7 +143,7 @@ def build_finished(app, exception): shutil.rmtree(normalized_root) -def source_read(app, docname, source): # pylint: disable=unused-argument +def source_read(app, docname, source): # temp_data is cleared after each source file has been processed, # so populate the annotations at the beginning of every file read. app.env.temp_data["annotations"] = getattr(app.env, "autoapi_annotations", {}) diff --git a/autoapi/inheritance_diagrams.py b/autoapi/inheritance_diagrams.py index cb2e30f..1f59828 100644 --- a/autoapi/inheritance_diagrams.py +++ b/autoapi/inheritance_diagrams.py @@ -65,7 +65,7 @@ class _AutoapiInheritanceGraph(sphinx.ext.inheritance_diagram.InheritanceGraph): def _class_info( self, classes, show_builtins, private_bases, parts, aliases, top_classes - ): # pylint: disable=too-many-arguments + ): all_classes = {} def recurse(cls): diff --git a/autoapi/mappers/base.py b/autoapi/mappers/base.py index afa8cd1..19c86f9 100644 --- a/autoapi/mappers/base.py +++ b/autoapi/mappers/base.py @@ -221,7 +221,6 @@ class SphinxMapperBase: @staticmethod def find_files(patterns, dirs, ignore): - # pylint: disable=too-many-nested-blocks if not ignore: ignore = [] diff --git a/autoapi/mappers/python/astroid_utils.py b/autoapi/mappers/python/astroid_utils.py index 2b80967..b4018a0 100644 --- a/autoapi/mappers/python/astroid_utils.py +++ b/autoapi/mappers/python/astroid_utils.py @@ -5,8 +5,7 @@ import re import astroid import astroid.nodes -# Disable until pylint uses astroid 2.7 -import astroid.nodes.node_classes # pylint: disable=no-name-in-module +import astroid.nodes.node_classes import sphinx.util.logging _LOGGER = sphinx.util.logging.getLogger(__name__) @@ -473,7 +472,7 @@ def _iter_args(args, annotations, defaults): yield (name, format_annotation(annotation), default) -def get_args_info(args_node): # pylint: disable=too-many-branches,too-many-statements +def get_args_info(args_node): result = [] positional_only_defaults = [] positional_or_keyword_defaults = args_node.defaults diff --git a/autoapi/mappers/python/parser.py b/autoapi/mappers/python/parser.py index 724e055..1923f42 100644 --- a/autoapi/mappers/python/parser.py +++ b/autoapi/mappers/python/parser.py @@ -152,7 +152,7 @@ class Parser: def parse_asyncfunctiondef(self, node): return self.parse_functiondef(node) - def parse_functiondef(self, node): # pylint: disable=too-many-branches + def parse_functiondef(self, node): if astroid_utils.is_decorated_with_property_setter(node): return [] diff --git a/docs/changes/+5819ffe5.misc b/docs/changes/+5819ffe5.misc new file mode 100644 index 0000000..c141b98 --- /dev/null +++ b/docs/changes/+5819ffe5.misc @@ -0,0 +1 @@ +Removed old pylint pragmas \ No newline at end of file