misc: refer to pylint codes, not numbers (#52484)

This commit is contained in:
Frédéric Péters 2021-03-30 11:13:29 +02:00
parent e8fbf9a60c
commit feb7590635
7 changed files with 38 additions and 36 deletions

View File

@ -19,5 +19,5 @@ import sys
sys.path.insert(0, os.path.dirname(__file__))
from . import monkeypatch # noqa isort: skip pylint: disable=C0413
from . import compat # noqa isort: skip pylint: disable=C0413
from . import monkeypatch # noqa isort: skip pylint: disable=wrong-import-position
from . import compat # noqa isort: skip pylint: disable=wrong-import-position

View File

@ -32,7 +32,7 @@ from . import custom_views
from . import sessions
from .admin import RootDirectory as AdminRootDirectory
from .backoffice import RootDirectory as BackofficeRootDirectory
from .Defaults import * # noqa pylint: disable=W0401
from .Defaults import * # noqa pylint: disable=wildcard-import
from .qommon.cron import CronJob
from .qommon.publisher import QommonPublisher
from .qommon.publisher import get_request
@ -43,7 +43,7 @@ from .tracking_code import TrackingCode
from .users import User
try:
from .wcs_cfg import * # noqa pylint: disable=W0401
from .wcs_cfg import * # noqa pylint: disable=wildcard-import
except ImportError:
pass

View File

@ -55,10 +55,10 @@ def N_(x):
return x
from . import publisher # noqa pylint: disable=C0413
from .publisher import get_cfg # noqa pylint: disable=C0413
from .publisher import get_logger # noqa pylint: disable=C0413
from .publisher import get_publisher_class # noqa pylint: disable=C0413
from . import publisher # noqa pylint: disable=wrong-import-position
from .publisher import get_cfg # noqa pylint: disable=wrong-import-position
from .publisher import get_logger # noqa pylint: disable=wrong-import-position
from .publisher import get_publisher_class # noqa pylint: disable=wrong-import-position
publisher._ = _

View File

@ -16,7 +16,7 @@
import subprocess
from uwsgidecorators import spool # pylint: disable=E0401
from uwsgidecorators import spool # pylint: disable=import-error
@spool

View File

@ -2414,7 +2414,7 @@ class SqlUser(SqlMixin, wcs.users.User):
o.verified_fields,
o.lasso_dump,
o.last_seen,
ascii_name, # XXX what's this ? pylint: disable=W0612
ascii_name, # XXX what's this ? pylint: disable=unused-variable
o.deleted_timestamp,
o.is_active,
) = [str_encode(x) for x in tuple(row[:13])]

View File

@ -189,7 +189,8 @@ class RemoveRoleWorkflowStatusItem(WorkflowStatusItem):
def after_job(job=None):
signed_url = sign_ws_url(url)
response, status, data, auth_header = http_delete_request(signed_url) # pylint: disable=W0612
# pylint: disable=unused-variable
response, status, data, auth_header = http_delete_request(signed_url)
if status != 200:
get_logger().error('failed to remove role %r from user %r', role, user)

View File

@ -1325,8 +1325,9 @@ class WorkflowGlobalActionTimeoutTrigger(WorkflowGlobalActionTrigger):
except Exception:
# get the variables in the locals() namespace so they are
# displayed within the trace.
expression = self.anchor_expression # noqa pylint: disable=W0612
global_variables = get_publisher().get_global_eval_dict() # noqa pylint: disable=W0612
expression = self.anchor_expression # noqa pylint: disable=unused-variable
# noqa pylint: disable=unused-variable
global_variables = get_publisher().get_global_eval_dict()
get_publisher().notify_of_exception(sys.exc_info(), context='[TIMEOUTS]')
# convert anchor_date to datetime.datetime()
@ -3321,29 +3322,29 @@ register_item_class(EditableWorkflowStatusItem)
def load_extra():
from .wf import aggregation_email # noqa pylint: disable=W0611
from .wf import anonymise # noqa pylint: disable=W0611
from .wf import attachment # noqa pylint: disable=W0611
from .wf import backoffice_fields # noqa pylint: disable=W0611
from .wf import create_carddata # noqa pylint: disable=W0611
from .wf import create_formdata # noqa pylint: disable=W0611
from .wf import criticality # noqa pylint: disable=W0611
from .wf import dispatch # noqa pylint: disable=W0611
from .wf import edit_carddata # noqa pylint: disable=W0611
from .wf import export_to_model # noqa pylint: disable=W0611
from .wf import external_workflow # noqa pylint: disable=W0611
from .wf import form # noqa pylint: disable=W0611
from .wf import geolocate # noqa pylint: disable=W0611
from .wf import jump # noqa pylint: disable=W0611
from .wf import notification # noqa pylint: disable=W0611
from .wf import profile # noqa pylint: disable=W0611
from .wf import redirect_to_url # noqa pylint: disable=W0611
from .wf import register_comment # noqa pylint: disable=W0611
from .wf import remove # noqa pylint: disable=W0611
from .wf import resubmit # noqa pylint: disable=W0611
from .wf import roles # noqa pylint: disable=W0611
from .wf import timeout_jump # noqa pylint: disable=W0611
from .wf import wscall # noqa pylint: disable=W0611
from .wf import aggregation_email # noqa pylint: disable=unused-import
from .wf import anonymise # noqa pylint: disable=unused-import
from .wf import attachment # noqa pylint: disable=unused-import
from .wf import backoffice_fields # noqa pylint: disable=unused-import
from .wf import create_carddata # noqa pylint: disable=unused-import
from .wf import create_formdata # noqa pylint: disable=unused-import
from .wf import criticality # noqa pylint: disable=unused-import
from .wf import dispatch # noqa pylint: disable=unused-import
from .wf import edit_carddata # noqa pylint: disable=unused-import
from .wf import export_to_model # noqa pylint: disable=unused-import
from .wf import external_workflow # noqa pylint: disable=unused-import
from .wf import form # noqa pylint: disable=unused-import
from .wf import geolocate # noqa pylint: disable=unused-import
from .wf import jump # noqa pylint: disable=unused-import
from .wf import notification # noqa pylint: disable=unused-import
from .wf import profile # noqa pylint: disable=unused-import
from .wf import redirect_to_url # noqa pylint: disable=unused-import
from .wf import register_comment # noqa pylint: disable=unused-import
from .wf import remove # noqa pylint: disable=unused-import
from .wf import resubmit # noqa pylint: disable=unused-import
from .wf import roles # noqa pylint: disable=unused-import
from .wf import timeout_jump # noqa pylint: disable=unused-import
from .wf import wscall # noqa pylint: disable=unused-import
from .wf.export_to_model import ExportToModel # noqa pylint: disable=unused-import,wrong-import-position