forked from zaclys/searxng
Merge pull request #301 from return42/fix-lintrc
[pylint] .pylintrc - disable missing-function-docstring
This commit is contained in:
commit
e41f78b806
@ -59,7 +59,9 @@ confidence=
|
||||
# --enable=similarities". If you want to run only the classes checker, but have
|
||||
# no Warning level messages displayed, use"--disable=all --enable=classes
|
||||
# --disable=W"
|
||||
disable=bad-whitespace, duplicate-code
|
||||
disable=bad-whitespace,
|
||||
duplicate-code,
|
||||
missing-function-docstring,
|
||||
|
||||
# Enable the message, report, category or checker with the given id(s). You can
|
||||
# either give multiple identifier separated by comma (,) or put this option
|
||||
|
@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# lint: pylint
|
||||
# pylint: disable=missing-function-docstring, missing-module-docstring
|
||||
# pylint: disable=missing-module-docstring
|
||||
|
||||
from os.path import dirname, abspath
|
||||
import logging
|
||||
|
@ -1,6 +1,5 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# lint: pylint
|
||||
# pylint: disable=missing-function-docstring
|
||||
"""This module implements the engine loader.
|
||||
|
||||
Load and initialize the ``engines``, see :py:func:`load_engines` and register
|
||||
|
@ -3,7 +3,7 @@
|
||||
"""APKMirror
|
||||
"""
|
||||
|
||||
# pylint: disable=invalid-name, missing-function-docstring
|
||||
# pylint: disable=invalid-name
|
||||
|
||||
from urllib.parse import urlencode
|
||||
from lxml import html
|
||||
|
@ -8,8 +8,6 @@ Explore thousands of artworks from The Art Institute of Chicago.
|
||||
|
||||
"""
|
||||
|
||||
# pylint: disable=missing-function-docstring
|
||||
|
||||
from json import loads
|
||||
from urllib.parse import urlencode
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
"""CORE (science)
|
||||
|
||||
"""
|
||||
# pylint: disable=missing-function-docstring
|
||||
|
||||
from json import loads
|
||||
from datetime import datetime
|
||||
|
@ -3,7 +3,6 @@
|
||||
"""
|
||||
Deviantart (Images)
|
||||
"""
|
||||
# pylint: disable=missing-function-docstring
|
||||
|
||||
from urllib.parse import urlencode
|
||||
from lxml import html
|
||||
|
@ -3,7 +3,6 @@
|
||||
"""
|
||||
Digg (News, Social media)
|
||||
"""
|
||||
# pylint: disable=missing-function-docstring
|
||||
|
||||
from json import loads
|
||||
from urllib.parse import urlencode
|
||||
|
@ -1,6 +1,5 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# lint: pylint
|
||||
# pylint: disable=missing-function-docstring
|
||||
"""Docker Hub (IT)
|
||||
|
||||
"""
|
||||
|
@ -1,6 +1,5 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# lint: pylint
|
||||
# pylint: disable=missing-function-docstring
|
||||
"""DuckDuckGo (Instant Answer API)
|
||||
|
||||
"""
|
||||
|
@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# lint: pylint
|
||||
# pylint: disable=invalid-name, missing-function-docstring
|
||||
# pylint: disable=invalid-name
|
||||
"""Genius
|
||||
|
||||
"""
|
||||
|
@ -3,7 +3,7 @@
|
||||
"""
|
||||
Gigablast (Web)
|
||||
"""
|
||||
# pylint: disable=missing-function-docstring, invalid-name
|
||||
# pylint: disable=invalid-name
|
||||
|
||||
import re
|
||||
from json import loads
|
||||
|
@ -25,8 +25,6 @@ The google WEB engine itself has a special setup option:
|
||||
|
||||
"""
|
||||
|
||||
# pylint: disable=invalid-name, missing-function-docstring
|
||||
|
||||
from urllib.parse import urlencode
|
||||
from lxml import html
|
||||
from searx.utils import match_language, extract_text, eval_xpath, eval_xpath_list, eval_xpath_getindex
|
||||
|
@ -11,7 +11,7 @@ ignores some parameters from the common :ref:`google API`:
|
||||
|
||||
"""
|
||||
|
||||
# pylint: disable=invalid-name, missing-function-docstring
|
||||
# pylint: disable=invalid-name
|
||||
|
||||
import binascii
|
||||
from datetime import datetime
|
||||
|
@ -9,7 +9,7 @@ Definitions`_.
|
||||
https://developers.google.com/custom-search/docs/xml_results#WebSearch_Query_Parameter_Definitions
|
||||
"""
|
||||
|
||||
# pylint: disable=invalid-name, missing-function-docstring
|
||||
# pylint: disable=invalid-name
|
||||
|
||||
from urllib.parse import urlencode
|
||||
from datetime import datetime
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
"""
|
||||
|
||||
# pylint: disable=invalid-name, missing-function-docstring
|
||||
# pylint: disable=invalid-name
|
||||
|
||||
import re
|
||||
from urllib.parse import urlencode
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
"""
|
||||
|
||||
# pylint: disable=missing-function-docstring
|
||||
|
||||
import datetime
|
||||
from json import loads, dumps
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
Meilisearch
|
||||
"""
|
||||
|
||||
# pylint: disable=global-statement, missing-function-docstring
|
||||
# pylint: disable=global-statement
|
||||
|
||||
from json import loads, dumps
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# lint: pylint
|
||||
# pylint: disable=missing-function-docstring
|
||||
"""MongoDB engine (Offline)
|
||||
|
||||
"""
|
||||
|
@ -1,6 +1,5 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# lint: pylint
|
||||
# pylint: disable=missing-function-docstring
|
||||
"""MySQL database (offline)
|
||||
|
||||
"""
|
||||
|
@ -3,7 +3,6 @@
|
||||
"""OpenStreetMap (Map)
|
||||
|
||||
"""
|
||||
# pylint: disable=missing-function-docstring
|
||||
|
||||
import re
|
||||
from json import loads
|
||||
|
@ -1,6 +1,5 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# lint: pylint
|
||||
# pylint: disable=missing-function-docstring
|
||||
"""PostgreSQL database (offline)
|
||||
|
||||
"""
|
||||
|
@ -1,6 +1,5 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# lint: pylint
|
||||
# pylint: disable=missing-function-docstring
|
||||
"""Redis engine (offline)
|
||||
|
||||
"""
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
"""
|
||||
|
||||
# pylint: disable=missing-function-docstring
|
||||
|
||||
from json import loads
|
||||
from urllib.parse import urlencode
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
Solr
|
||||
"""
|
||||
|
||||
# pylint: disable=global-statement, missing-function-docstring
|
||||
# pylint: disable=global-statement
|
||||
|
||||
from json import loads
|
||||
from urllib.parse import urlencode
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
"""
|
||||
|
||||
# pylint: disable=missing-function-docstring
|
||||
|
||||
from datetime import datetime
|
||||
from json import loads
|
||||
from urllib.parse import urlencode
|
||||
|
@ -1,6 +1,5 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# lint: pylint
|
||||
# pylint: disable=missing-function-docstring
|
||||
|
||||
"""SQLite database (Offline)
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# lint: pylint
|
||||
# pylint: disable=missing-function-docstring
|
||||
"""Unsplash
|
||||
|
||||
"""
|
||||
|
@ -1,6 +1,5 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# lint: pylint
|
||||
# pylint: disable=missing-function-docstring
|
||||
"""The XPath engine is a *generic* engine with which it is possible to configure
|
||||
engines in the settings.
|
||||
|
||||
|
@ -6,7 +6,7 @@ Yahoo News is "English only" and do not offer localized nor language queries.
|
||||
|
||||
"""
|
||||
|
||||
# pylint: disable=invalid-name, missing-function-docstring
|
||||
# pylint: disable=invalid-name
|
||||
|
||||
import re
|
||||
from urllib.parse import urlencode
|
||||
|
@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# lint: pylint
|
||||
# pylint: disable=missing-module-docstring,missing-function-docstring
|
||||
# pylint: disable=missing-module-docstring
|
||||
|
||||
from urllib.parse import urlparse
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# lint: pylint
|
||||
# pylint: disable=missing-module-docstring, missing-function-docstring
|
||||
# pylint: disable=missing-module-docstring
|
||||
|
||||
import typing
|
||||
import math
|
||||
|
@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# lint: pylint
|
||||
# pylint: disable=missing-module-docstring, missing-function-docstring, global-statement
|
||||
# pylint: disable=missing-module-docstring, global-statement
|
||||
|
||||
import asyncio
|
||||
import threading
|
||||
|
@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# lint: pylint
|
||||
# pylint: disable=missing-module-docstring, missing-function-docstring, global-statement
|
||||
# pylint: disable=missing-module-docstring, global-statement
|
||||
|
||||
import asyncio
|
||||
import logging
|
||||
|
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# lint: pylint
|
||||
# pylint: disable=global-statement
|
||||
# pylint: disable=missing-module-docstring, missing-class-docstring, missing-function-docstring
|
||||
# pylint: disable=missing-module-docstring, missing-class-docstring
|
||||
|
||||
import atexit
|
||||
import asyncio
|
||||
|
@ -1,6 +1,5 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# lint: pylint
|
||||
# pylint: disable=missing-function-docstring
|
||||
"""Raise exception for an HTTP response is an error.
|
||||
|
||||
"""
|
||||
|
@ -117,7 +117,7 @@ class MultipleChoiceSetting(EnumStringSetting):
|
||||
self._validate_selections(elements)
|
||||
self.value = elements
|
||||
|
||||
def parse_form(self, data): # pylint: disable=missing-function-docstring
|
||||
def parse_form(self, data):
|
||||
if self.locked:
|
||||
return
|
||||
|
||||
@ -154,7 +154,7 @@ class SetSetting(Setting):
|
||||
for element in elements:
|
||||
self.values.add(element)
|
||||
|
||||
def parse_form(self, data): # pylint: disable=missing-function-docstring
|
||||
def parse_form(self, data):
|
||||
if self.locked:
|
||||
return
|
||||
|
||||
@ -226,22 +226,22 @@ class SwitchableSetting(Setting):
|
||||
if not hasattr(self, 'choices'):
|
||||
raise MissingArgumentException('missing argument: choices')
|
||||
|
||||
def transform_form_items(self, items): # pylint: disable=missing-function-docstring
|
||||
def transform_form_items(self, items):
|
||||
# pylint: disable=no-self-use
|
||||
return items
|
||||
|
||||
def transform_values(self, values): # pylint: disable=missing-function-docstring
|
||||
def transform_values(self, values):
|
||||
# pylint: disable=no-self-use
|
||||
return values
|
||||
|
||||
def parse_cookie(self, data): # pylint: disable=missing-function-docstring
|
||||
def parse_cookie(self, data):
|
||||
# pylint: disable=attribute-defined-outside-init
|
||||
if data[DISABLED] != '':
|
||||
self.disabled = set(data[DISABLED].split(','))
|
||||
if data[ENABLED] != '':
|
||||
self.enabled = set(data[ENABLED].split(','))
|
||||
|
||||
def parse_form(self, items): # pylint: disable=missing-function-docstring
|
||||
def parse_form(self, items):
|
||||
if self.locked:
|
||||
return
|
||||
|
||||
@ -262,14 +262,14 @@ class SwitchableSetting(Setting):
|
||||
resp.set_cookie('disabled_{0}'.format(self.value), ','.join(self.disabled), max_age=COOKIE_MAX_AGE)
|
||||
resp.set_cookie('enabled_{0}'.format(self.value), ','.join(self.enabled), max_age=COOKIE_MAX_AGE)
|
||||
|
||||
def get_disabled(self): # pylint: disable=missing-function-docstring
|
||||
def get_disabled(self):
|
||||
disabled = self.disabled
|
||||
for choice in self.choices: # pylint: disable=no-member
|
||||
if not choice['default_on'] and choice['id'] not in self.enabled:
|
||||
disabled.add(choice['id'])
|
||||
return self.transform_values(disabled)
|
||||
|
||||
def get_enabled(self): # pylint: disable=missing-function-docstring
|
||||
def get_enabled(self):
|
||||
enabled = self.enabled
|
||||
for choice in self.choices: # pylint: disable=no-member
|
||||
if choice['default_on'] and choice['id'] not in self.disabled:
|
||||
@ -515,7 +515,7 @@ class Preferences:
|
||||
resp.set_cookie(k, v, max_age=COOKIE_MAX_AGE)
|
||||
return resp
|
||||
|
||||
def validate_token(self, engine): # pylint: disable=missing-function-docstring
|
||||
def validate_token(self, engine):
|
||||
valid = True
|
||||
if hasattr(engine, 'tokens') and engine.tokens:
|
||||
valid = False
|
||||
|
@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# lint: pylint
|
||||
# pylint: disable=missing-module-docstring, missing-function-docstring
|
||||
# pylint: disable=missing-module-docstring
|
||||
|
||||
import typing
|
||||
import threading
|
||||
|
@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# lint: pylint
|
||||
# pylint: disable=missing-module-docstring, missing-function-docstring
|
||||
# pylint: disable=missing-module-docstring
|
||||
|
||||
import sys
|
||||
import io
|
||||
|
@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# lint: pylint
|
||||
# pylint: disable=missing-module-docstring, missing-function-docstring
|
||||
# pylint: disable=missing-module-docstring
|
||||
|
||||
import json
|
||||
import random
|
||||
|
@ -19,8 +19,6 @@ from searx.utils import get_engine_from_settings
|
||||
logger = logger.getChild('searx.search.processor')
|
||||
SUSPENDED_STATUS = {}
|
||||
|
||||
# pylint: disable=missing-function-docstring
|
||||
|
||||
class SuspendedStatus:
|
||||
"""Class to handle suspend state."""
|
||||
|
||||
|
@ -12,8 +12,6 @@ from .online import OnlineProcessor
|
||||
|
||||
parser_re = re.compile('.*?(\\d+(?:\\.\\d+)?) ([^.0-9]+) (?:in|to) ([^.0-9]+)', re.I)
|
||||
|
||||
# pylint: disable=missing-function-docstring
|
||||
|
||||
def normalize_name(name):
|
||||
name = name.lower().replace('-', ' ').rstrip('s')
|
||||
name = re.sub(' +', ' ', name)
|
||||
|
@ -1,6 +1,5 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# lint: pylint
|
||||
# pylint: disable=missing-function-docstring
|
||||
"""Implementation of the default settings.
|
||||
|
||||
"""
|
||||
|
@ -14,7 +14,7 @@ else:
|
||||
old_thread_init = threading.Thread.__init__
|
||||
|
||||
def new_thread_init(self, *args, **kwargs):
|
||||
# pylint: disable=protected-access, disable=c-extension-no-member, disable=missing-function-docstring
|
||||
# pylint: disable=protected-access, disable=c-extension-no-member
|
||||
old_thread_init(self, *args, **kwargs)
|
||||
setproctitle.setthreadtitle(self._name)
|
||||
threading.Thread.__init__ = new_thread_init
|
||||
|
@ -1,6 +1,6 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# lint: pylint
|
||||
# pylint: disable=missing-function-docstring,missing-module-docstring,missing-class-docstring
|
||||
# pylint: disable=,missing-module-docstring,missing-class-docstring
|
||||
|
||||
import re
|
||||
import os
|
||||
|
@ -1,7 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# lint: pylint
|
||||
# pylint: disable=missing-function-docstring
|
||||
"""WebbApp
|
||||
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user