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: ...@@ -5,7 +5,7 @@ variables:
GIT_SUBMODULE_STRATEGY: normal GIT_SUBMODULE_STRATEGY: normal
APT_API_URL: https://packages.cccv.de APT_API_URL: https://packages.cccv.de
APT_REPO: uffd APT_REPO: uffd
PYLINT_PIN: pylint~=2.10.0 PYLINT_PIN: pylint~=2.16.2
before_script: before_script:
- python3 -V - python3 -V
......
...@@ -68,6 +68,8 @@ disable=missing-module-docstring, ...@@ -68,6 +68,8 @@ disable=missing-module-docstring,
too-many-ancestors, too-many-ancestors,
duplicate-code, duplicate-code,
redefined-builtin, redefined-builtin,
superfluous-parens,
consider-using-f-string, # Temporary
# Enable the message, report, category or checker with the given id(s). You can # 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 # either give multiple identifier separated by comma (,) or put this option
...@@ -386,13 +388,6 @@ max-line-length=160 ...@@ -386,13 +388,6 @@ max-line-length=160
# Maximum number of lines in a module. # Maximum number of lines in a module.
max-module-lines=1000 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 # Allow the body of a class to be on the same line as the declaration if body
# contains single statement. # contains single statement.
single-line-class-stmt=no single-line-class-stmt=no
...@@ -513,5 +508,5 @@ min-public-methods=2 ...@@ -513,5 +508,5 @@ min-public-methods=2
# Exceptions that will emit a warning when being caught. Defaults to # Exceptions that will emit a warning when being caught. Defaults to
# "BaseException, Exception". # "BaseException, Exception".
overgeneral-exceptions=BaseException, overgeneral-exceptions=builtin.BaseException,
Exception builtin.Exception
...@@ -70,8 +70,7 @@ class DeviceLoginInitiation(db.Model): ...@@ -70,8 +70,7 @@ class DeviceLoginInitiation(db.Model):
existing and possibly attacker-controlled code). existing and possibly attacker-controlled code).
An initiation code is securly bound to the session that it was created 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 with by storing both id and secret in the authenticated session cookie.'''
session cookie.'''
__tablename__ = 'device_login_initiation' __tablename__ = 'device_login_initiation'
id = Column(Integer(), primary_key=True, autoincrement=True) id = Column(Integer(), primary_key=True, autoincrement=True)
......
...@@ -206,7 +206,7 @@ class InvalidPasswordHash: ...@@ -206,7 +206,7 @@ class InvalidPasswordHash:
def __init__(self, value=None): def __init__(self, value=None):
self.value = value self.value = value
# pylint: disable=no-self-use,unused-argument # pylint: disable=unused-argument
def verify(self, password): def verify(self, password):
return False return False
......
...@@ -14,8 +14,6 @@ class Remailer: ...@@ -14,8 +14,6 @@ class Remailer:
Version 2 of the remailer address format is tolerant to case conversions at Version 2 of the remailer address format is tolerant to case conversions at
the cost of being slightly longer.''' the cost of being slightly longer.'''
# pylint: disable=no-self-use
@property @property
def configured(self): def configured(self):
return bool(current_app.config['REMAILER_DOMAIN']) return bool(current_app.config['REMAILER_DOMAIN'])
......
...@@ -180,7 +180,7 @@ def prometheus_metrics(): ...@@ -180,7 +180,7 @@ def prometheus_metrics():
from prometheus_client import PLATFORM_COLLECTOR, generate_latest, CONTENT_TYPE_LATEST #pylint: disable=import-outside-toplevel from prometheus_client import PLATFORM_COLLECTOR, generate_latest, CONTENT_TYPE_LATEST #pylint: disable=import-outside-toplevel
class UffdCollector(): class UffdCollector():
def collect(self): #pylint: disable=no-self-use def collect(self):
try: try:
uffd_version = str(pkg_resources.get_distribution('uffd').version) uffd_version = str(pkg_resources.get_distribution('uffd').version)
except pkg_resources.DistributionNotFound: except pkg_resources.DistributionNotFound:
......
...@@ -28,7 +28,7 @@ def overview_login_maybe_required(func): ...@@ -28,7 +28,7 @@ def overview_login_maybe_required(func):
return decorator return decorator
def overview_navbar_visible(): def overview_navbar_visible():
return get_services(request.user) != [] or admin_acl() return get_services(request.user) or admin_acl()
@bp.route('/services/') @bp.route('/services/')
@register_navbar(lazy_gettext('Services'), icon='sitemap', blueprint=bp, visible=overview_navbar_visible) @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