forked from zaclys/searxng
[pylint] searx: drop no longer needed 'missing-function-docstring'
Suggested-by: @dalf https://github.com/searxng/searxng/issues/102#issuecomment-914168470 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
f0059b80ed
commit
2a3b9a2e26
|
@ -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,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