Skip to content
Snippets Groups Projects
Commit c2b30f17 authored by Julian's avatar Julian
Browse files

Update pylint to v2.16.2 for python3.11 compatibility

parent ee8db499
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ variables:
GIT_SUBMODULE_STRATEGY: normal
APT_API_URL: https://packages.cccv.de
APT_REPO: uffd
PYLINT_PIN: pylint~=2.10.0
PYLINT_PIN: pylint~=2.16.2
before_script:
- python3 -V
......
......@@ -68,6 +68,8 @@ disable=missing-module-docstring,
too-many-ancestors,
duplicate-code,
redefined-builtin,
superfluous-parens,
consider-using-f-string, # Temporary
# 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
......@@ -386,13 +388,6 @@ max-line-length=160
# Maximum number of lines in a module.
max-module-lines=1000
# List of optional constructs for which whitespace checking is disabled. `dict-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
# `empty-line` allows space-only lines.
no-space-check=trailing-comma,
dict-separator
# Allow the body of a class to be on the same line as the declaration if body
# contains single statement.
single-line-class-stmt=no
......@@ -513,5 +508,5 @@ min-public-methods=2
# Exceptions that will emit a warning when being caught. Defaults to
# "BaseException, Exception".
overgeneral-exceptions=BaseException,
Exception
overgeneral-exceptions=builtin.BaseException,
builtin.Exception
......@@ -70,8 +70,7 @@ class DeviceLoginInitiation(db.Model):
existing and possibly attacker-controlled code).
An initiation code is securly bound to the session that it was created
with by storing both id and secret in the encrypted and authenticated
session cookie.'''
with by storing both id and secret in the authenticated session cookie.'''
__tablename__ = 'device_login_initiation'
id = Column(Integer(), primary_key=True, autoincrement=True)
......
......@@ -206,7 +206,7 @@ class InvalidPasswordHash:
def __init__(self, value=None):
self.value = value
# pylint: disable=no-self-use,unused-argument
# pylint: disable=unused-argument
def verify(self, password):
return False
......
......@@ -14,8 +14,6 @@ class Remailer:
Version 2 of the remailer address format is tolerant to case conversions at
the cost of being slightly longer.'''
# pylint: disable=no-self-use
@property
def configured(self):
return bool(current_app.config['REMAILER_DOMAIN'])
......
......@@ -180,7 +180,7 @@ def prometheus_metrics():
from prometheus_client import PLATFORM_COLLECTOR, generate_latest, CONTENT_TYPE_LATEST #pylint: disable=import-outside-toplevel
class UffdCollector():
def collect(self): #pylint: disable=no-self-use
def collect(self):
try:
uffd_version = str(pkg_resources.get_distribution('uffd').version)
except pkg_resources.DistributionNotFound:
......
......@@ -28,7 +28,7 @@ def overview_login_maybe_required(func):
return decorator
def overview_navbar_visible():
return get_services(request.user) != [] or admin_acl()
return get_services(request.user) or admin_acl()
@bp.route('/services/')
@register_navbar(lazy_gettext('Services'), icon='sitemap', blueprint=bp, visible=overview_navbar_visible)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment