Projet

Général

Profil

Development #63174

corrections pour pylint 2.13

Ajouté par Benjamin Dauvergne il y a environ 2 ans. Mis à jour il y a environ 2 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
-
Début:
25 mars 2022
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

https://jenkins.entrouvert.org/job/authentic/2589/

************* Module src.authentic2_auth_oidc.backends
src/authentic2_auth_oidc/backends.py:36: [W0237(arguments-renamed), OIDCBackend.authenticate] Parameter 'username' has been renamed to 'access_token' in overridden 'OIDCBackend.authenticate' method
src/authentic2_auth_oidc/backends.py:36: [W0237(arguments-renamed), OIDCBackend.authenticate] Parameter 'password' has been renamed to 'id_token' in overridden 'OIDCBackend.authenticate' method
************* Module src.authentic2.views
src/authentic2/views.py:1438: [E0601(used-before-assignment), ValidateDeletionView.dispatch] Using variable 'error' before assignment
************* Module src.authentic2.idp.saml.saml2_endpoints
src/authentic2/idp/saml/saml2_endpoints.py:1332: [W4701(modified-iterating-list), slo_soap] Iterated list 'lib_sessions' is being modified inside for loop body, consider iterating through a copy of it instead.
************* Module src.authentic2.manager.journal_event_types
src/authentic2/manager/journal_event_types.py:302: [W0237(arguments-renamed), RoleEventsMixin.record] Parameter 'session' has been renamed to 'role' in overridden 'RoleEventsMixin.record' method
src/authentic2/manager/journal_event_types.py:302: [W0237(arguments-renamed), RoleEventsMixin.record] Parameter 'references' has been renamed to 'session' in overridden 'RoleEventsMixin.record' method
src/authentic2/manager/journal_event_types.py:302: [W0237(arguments-renamed), RoleEventsMixin.record] Parameter 'data' has been renamed to 'references' in overridden 'RoleEventsMixin.record' method
src/authentic2/manager/journal_event_types.py:302: [W0237(arguments-renamed), RoleEventsMixin.record] Parameter 'api' has been renamed to 'data' in overridden 'RoleEventsMixin.record' method
************* Module src.authentic2_idp_oidc.views
src/authentic2_idp_oidc/views.py:270: [E0601(used-before-assignment), authorize] Using variable 'state' before assignment
src/authentic2_idp_oidc/views.py:271: [E0601(used-before-assignment), authorize] Using variable 'use_fragment' before assignment

Fichiers

Révisions associées

Révision eb8cd06d (diff)
Ajouté par Benjamin Dauvergne il y a environ 2 ans

misc: fix pylint errors (#63174)

Révision 43ac8dbb (diff)
Ajouté par Benjamin Dauvergne il y a environ 2 ans

journal: make all record() arguments keyword only (#63174)

Historique

#1

Mis à jour par Benjamin Dauvergne il y a environ 2 ans

Pour la correction coté SAML j'avais commencé par faire for lib_session in list(lib_sessions): mais ça a complètement fait dysjoncter pylint, donc passage par l'intermédiaire d'une liste lib_sessions_to_remove.

#2

Mis à jour par Paul Marillonnet il y a environ 2 ans

  • Statut changé de Solution proposée à Solution validée

Ok. Étrange que le dico modifié en cours d’itération soit passé jusque là, je croyais que pylint < 2.13 était déjà à l’affût de ce genre de choses.
Dans 0001, pas compris pourquoi il y a un diff sur tox.ini. C’est vim qui ajoute un retour à la ligne manquant à la fin du fichier ?

#3

Mis à jour par Benjamin Dauvergne il y a environ 2 ans

  • Statut changé de Solution validée à Résolu (à déployer)
commit 43ac8dbb51f5a91ad21fc4aa62d70c4063932c58
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Fri Mar 25 07:46:13 2022 +0100

    journal: make all record() arguments keyword only (#63174)

commit eb8cd06d80dbc8b9eb21af3b50fa655036d778db
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Fri Mar 25 06:59:12 2022 +0100

    misc: fix pylint errors (#63174)
#4

Mis à jour par Benjamin Dauvergne il y a environ 2 ans

J'ai viré la modification à tox.ini avant de pousser; concernant pylint il ne faut pas trop se poser de question, c'est vraiment écrit avec les pieds ils n'ont pas de réel modèle statique du code derrière comme dans magpie ou les autres typeurs de code, c'est juste des tonnes d'heuristiques empilées qui des fois déconnent.

#5

Mis à jour par Transition automatique il y a environ 2 ans

  • Statut changé de Résolu (à déployer) à Solution déployée
#6

Mis à jour par Transition automatique il y a presque 2 ans

Automatic expiration

Formats disponibles : Atom PDF