Removed old pylint pragmas

pull/398/head
Ashley Whetter 11 months ago
parent a22ae9262a
commit 92437c9af7

@ -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

@ -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

@ -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,

@ -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", {})

@ -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):

@ -221,7 +221,6 @@ class SphinxMapperBase:
@staticmethod
def find_files(patterns, dirs, ignore):
# pylint: disable=too-many-nested-blocks
if not ignore:
ignore = []

@ -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

@ -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 []

@ -0,0 +1 @@
Removed old pylint pragmas
Loading…
Cancel
Save