misc: fix pylint unused-private-member (#55264)

This commit is contained in:
Lauréline Guérin 2021-07-01 18:37:03 +02:00
parent a5a1ddfee7
commit 0c11395af5
No known key found for this signature in database
GPG Key ID: 1FAB9B9B4F93D473
4 changed files with 14 additions and 21 deletions

View File

@ -54,8 +54,7 @@ disable=
unnecessary-comprehension,
unsubscriptable-object,
unsupported-membership-test,
unused-argument,
unused-private-member
unused-argument
[REPORTS]

View File

@ -29,7 +29,7 @@ def bool2xs(boolean):
class Metadata:
__endpoints = {'slo': 'singleLogout', 'ac': 'assertionConsumer'}
internal_endpoints = {'slo': 'singleLogout', 'ac': 'assertionConsumer'}
def __init__(self, publisher, provider_id, config):
self.publisher = publisher
@ -108,7 +108,7 @@ class Metadata:
sp_key = self.get_key_descriptors(signing_pem_key, encryption_pem_key)
config = {}
config.update(self.config)
config.update(self.__endpoints)
config.update(self.internal_endpoints)
config.update(endpoints)
return (
prologue

View File

@ -36,11 +36,7 @@ from .upload_storage import get_storage_object
class QommonSession(QuixoteSession):
def __init__(self, id):
QuixoteSession.__init__(self, id)
env = get_request().environ
# add support for X_FORWARDED_FOR
self.__remote_address = env.get('X_FORWARDED_FOR', env.get('REMOTE_ADDR'))
pass
class CaptchaSession:

View File

@ -3092,24 +3092,22 @@ class classproperty:
class AnyFormData(SqlMixin):
_table_name = 'wcs_all_forms'
__table_static_fields = []
_formdef_cache = {}
_iterate_on_server = False
@classproperty
def _table_static_fields(self):
if self.__table_static_fields:
return self.__table_static_fields
from wcs.formdef import FormDef
if not hasattr(self, '__table_static_fields'):
from wcs.formdef import FormDef
fake_formdef = FormDef()
common_fields = get_view_fields(fake_formdef)
self.__table_static_fields = [(x[1], x[0]) for x in common_fields]
self.__table_static_fields.append(('criticality_level', 'criticality_level'))
self.__table_static_fields.append(('geoloc_base_x', 'geoloc_base_x'))
self.__table_static_fields.append(('geoloc_base_y', 'geoloc_base_y'))
self.__table_static_fields.append(('concerned_roles_array', 'concerned_roles_array'))
self.__table_static_fields.append(('anonymised', 'anonymised'))
fake_formdef = FormDef()
common_fields = get_view_fields(fake_formdef)
self.__table_static_fields = [(x[1], x[0]) for x in common_fields]
self.__table_static_fields.append(('criticality_level', 'criticality_level'))
self.__table_static_fields.append(('geoloc_base_x', 'geoloc_base_x'))
self.__table_static_fields.append(('geoloc_base_y', 'geoloc_base_y'))
self.__table_static_fields.append(('concerned_roles_array', 'concerned_roles_array'))
self.__table_static_fields.append(('anonymised', 'anonymised'))
return self.__table_static_fields
@classmethod