Project

General

Profile

Development #56982

Faire planter le build sur les erreurs pylint

Added by Valentin Deniaud 3 months ago. Updated 2 months ago.

Status:
Solution déployée
Priority:
Normal
Category:
-
Target version:
-
Start date:
16 Sep 2021
Due date:
% Done:

0%

Estimated time:
Patch proposed:
Yes
Planning:
No

Description

Comme c'est fait ailleurs.


Files

0035-misc-fix-use-dict-literal-pylint-error-56982.patch (1.33 KB) 0035-misc-fix-use-dict-literal-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0023-misc-fix-no-value-for-parameter-pylint-error-56982.patch (1.91 KB) 0023-misc-fix-no-value-for-parameter-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0056-misc-fix-logging-fstring-interpolation-pylint-error-.patch (1.6 KB) 0056-misc-fix-logging-fstring-interpolation-pylint-error-.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0054-misc-fix-raising-format-tuple-pylint-error-56982.patch (1.13 KB) 0054-misc-fix-raising-format-tuple-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0036-misc-fix-dangerous-default-value-pylint-error-56982.patch (6.51 KB) 0036-misc-fix-dangerous-default-value-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0004-misc-fix-empty-docstrings-pylint-error-56982.patch (783 Bytes) 0004-misc-fix-empty-docstrings-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0022-misc-fix-assignment-from-no-return-pylint-error-5698.patch (2.65 KB) 0022-misc-fix-assignment-from-no-return-pylint-error-5698.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0037-misc-fix-pointless-statement-pylint-error-56982.patch (7.09 KB) 0037-misc-fix-pointless-statement-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0019-misc-fix-import-error-pylint-error-56982.patch (5.38 KB) 0019-misc-fix-import-error-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0053-misc-fix-try-except-raise-pylint-error-56982.patch (1.43 KB) 0053-misc-fix-try-except-raise-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0049-misc-fix-unused-import-pylint-error-56982.patch (27.5 KB) 0049-misc-fix-unused-import-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0039-misc-fix-unnecessary-pass-pylint-error-56982.patch (2.63 KB) 0039-misc-fix-unnecessary-pass-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0047-misc-fix-global-variable-not-assigned-pylint-error-5.patch (1.37 KB) 0047-misc-fix-global-variable-not-assigned-pylint-error-5.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0006-misc-fix-misplaced-comparison-constant-pylint-error-.patch (2.71 KB) 0006-misc-fix-misplaced-comparison-constant-pylint-error-.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0031-misc-fix-no-else-break-pylint-error-56982.patch (1.89 KB) 0031-misc-fix-no-else-break-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0055-misc-fix-logging-not-lazy-pylint-error-56982.patch (14.2 KB) 0055-misc-fix-logging-not-lazy-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0032-misc-fix-consider-using-in-pylint-error-56982.patch (1.37 KB) 0032-misc-fix-consider-using-in-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0057-misc-fix-f-string-without-interpolation-pylint-error.patch (955 Bytes) 0057-misc-fix-f-string-without-interpolation-pylint-error.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0003-decorators-remove-broken-and-unused-decorator-56982.patch (1.9 KB) 0003-decorators-remove-broken-and-unused-decorator-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0028-misc-fix-useless-return-pylint-error-56982.patch (792 Bytes) 0028-misc-fix-useless-return-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0034-misc-fix-consider-using-with-pylint-error-56982.patch (6.29 KB) 0034-misc-fix-consider-using-with-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0043-misc-fix-useless-super-delegation-pylint-error-56982.patch (1.16 KB) 0043-misc-fix-useless-super-delegation-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0052-misc-fix-unbalanced-tuple-unpacking-pylint-error-569.patch (844 Bytes) 0052-misc-fix-unbalanced-tuple-unpacking-pylint-error-569.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0020-misc-fix-used-before-assignment-pylint-error-56982.patch (915 Bytes) 0020-misc-fix-used-before-assignment-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0016-misc-fix-access-member-before-definition-pylint-erro.patch (914 Bytes) 0016-misc-fix-access-member-before-definition-pylint-erro.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0021-misc-fixundefined-variable-pylint-error-56982.patch (4.3 KB) 0021-misc-fixundefined-variable-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0029-misc-fix-consider-using-in-pylint-error-56982.patch (1.55 KB) 0029-misc-fix-consider-using-in-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0058-misc-fix-redundant-unittest-assert-pylint-error-5698.patch (845 Bytes) 0058-misc-fix-redundant-unittest-assert-pylint-error-5698.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0026-misc-fix-simplifiable-if-statement-pylint-error-5698.patch (1.73 KB) 0026-misc-fix-simplifiable-if-statement-pylint-error-5698.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0009-misc-fix-consider-using-dict-items-pylint-error-5698.patch (8.22 KB) 0009-misc-fix-consider-using-dict-items-pylint-error-5698.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0017-misc-fix-no-self-argument-pylint-error-56982.patch (1.99 KB) 0017-misc-fix-no-self-argument-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0042-misc-fix-comparison-with-callable-pylint-error-56982.patch (903 Bytes) 0042-misc-fix-comparison-with-callable-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0027-misc-fix-consider-using-ternary-pylint-error-56982.patch (1.42 KB) 0027-misc-fix-consider-using-ternary-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0048-misc-fix-global-statement-pylint-error-56982.patch (2.16 KB) 0048-misc-fix-global-statement-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0041-misc-fix-eval-used-pylint-error-56982.patch (1009 Bytes) 0041-misc-fix-eval-used-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0014-misc-fix-return-in-init-pylint-error-56982.patch (880 Bytes) 0014-misc-fix-return-in-init-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0051-misc-fix-unused-wildcard-import-pylint-error-56982.patch (803 Bytes) 0051-misc-fix-unused-wildcard-import-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0033-misc-fix-no-else-continue-pylint-error-56982.patch (5.24 KB) 0033-misc-fix-no-else-continue-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0050-misc-fix-unused-variable-pylint-error-56982.patch (69.1 KB) 0050-misc-fix-unused-variable-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0010-misc-fix-line-too-long-pylint-error-56982.patch (8.17 KB) 0010-misc-fix-line-too-long-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0015-misc-fix-function-redefined-pylint-error-56982.patch (9.28 KB) 0015-misc-fix-function-redefined-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0024-misc-fix-logging-too-many-args-pylint-error-56982.patch (1.04 KB) 0024-misc-fix-logging-too-many-args-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0046-misc-fix-reimported-pylint-error-56982.patch (10.2 KB) 0046-misc-fix-reimported-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0002-tests-replace-norequest-decorator-by-explicit-functi.patch (1.52 KB) 0002-tests-replace-norequest-decorator-by-explicit-functi.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0001-misc-update-pylint-configuration-56982.patch (5.63 KB) 0001-misc-update-pylint-configuration-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0013-misc-fix-len-as-condition-pylint-error-56982.patch (5.17 KB) 0013-misc-fix-len-as-condition-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0005-misc-fix-singleton-comparison-pylint-error-56982.patch (1.73 KB) 0005-misc-fix-singleton-comparison-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0012-misc-fix-ungrouped-imports-pylint-error-56982.patch (4.82 KB) 0012-misc-fix-ungrouped-imports-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0045-misc-fix-wildcard-import-pylint-error-56982.patch (757 Bytes) 0045-misc-fix-wildcard-import-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0007-misc-fix-unidiomatic-typecheck-pylint-error-56982.patch (1.46 KB) 0007-misc-fix-unidiomatic-typecheck-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0044-misc-fix-arguments-renamed-pylint-error-56982.patch (14.3 KB) 0044-misc-fix-arguments-renamed-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0025-misc-fix-consider-using-from-import-pylint-error-569.patch (2.05 KB) 0025-misc-fix-consider-using-from-import-pylint-error-569.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0018-misc-fix-invalid-str-returned-pylint-error-56982.patch (5.09 KB) 0018-misc-fix-invalid-str-returned-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0011-misc-fix-wrong-import-order-pylint-error-56982.patch (940 Bytes) 0011-misc-fix-wrong-import-order-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0030-misc-fix-no-else-raise-pylint-error-56982.patch (4.42 KB) 0030-misc-fix-no-else-raise-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0040-misc-fix-unnecessary-lambda-pylint-error-56982.patch (1.62 KB) 0040-misc-fix-unnecessary-lambda-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0059-misc-fix-deprecated-method-pylint-error-56982.patch (5.32 KB) 0059-misc-fix-deprecated-method-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0038-misc-fix-pointless-string-statement-pylint-error-569.patch (5.02 KB) 0038-misc-fix-pointless-string-statement-pylint-error-569.patch Valentin Deniaud, 21 Sep 2021 05:09 PM
0008-misc-fix-bad-classmethod-argument-pylint-error-56982.patch (4.72 KB) 0008-misc-fix-bad-classmethod-argument-pylint-error-56982.patch Valentin Deniaud, 21 Sep 2021 05:09 PM

Associated revisions

Revision e2079747 (diff)
Added by Valentin Deniaud 2 months ago

misc: update pylint configuration (#56982)

Revision 716a3599 (diff)
Added by Valentin Deniaud 2 months ago

tests: replace norequest decorator by explicit function (#56982)

Revision 7406f4e9 (diff)
Added by Valentin Deniaud 2 months ago

decorators: remove broken and unused decorator (#56982)

Revision a2d8680e (diff)
Added by Valentin Deniaud 2 months ago

misc: fix empty-docstrings pylint error (#56982)

Revision 42f0a436 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix singleton-comparison pylint error (#56982)

Revision a47bce50 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix misplaced-comparison-constant pylint error (#56982)

Revision fa778299 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix unidiomatic-typecheck pylint error (#56982)

Revision f3609da8 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix bad-classmethod-argument pylint error (#56982)

Revision aabe4af2 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix consider-using-dict-items pylint error (#56982)

Revision f20fa532 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix line-too-long pylint error (#56982)

Revision 7fd28d4c (diff)
Added by Valentin Deniaud 2 months ago

misc: fix wrong-import-order pylint error (#56982)

Revision 2c5acd16 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix ungrouped-imports pylint error (#56982)

Revision 3b6cfa51 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix len-as-condition pylint error (#56982)

Revision 2d0b05c5 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix return-in-init pylint error (#56982)

Revision f4ae48c1 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix function-redefined pylint error (#56982)

Revision e3adcd05 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix access-member-before-definition pylint error (#56982)

Revision df66d77b (diff)
Added by Valentin Deniaud 2 months ago

misc: fix no-self-argument pylint error (#56982)

Revision 3e5fc8a8 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix invalid-str-returned pylint error (#56982)

Revision 9d7aa5d8 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix import-error pylint error (#56982)

Revision b49ea2ea (diff)
Added by Valentin Deniaud 2 months ago

misc: fix used-before-assignment pylint error (#56982)

Revision e2647e64 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix undefined-variable pylint error (#56982)

Revision 36a31d9d (diff)
Added by Valentin Deniaud 2 months ago

misc: fix assignment-from-no-return pylint error (#56982)

Revision 2071defb (diff)
Added by Valentin Deniaud 2 months ago

misc: fix no-value-for-parameter pylint error (#56982)

Revision 1a08018f (diff)
Added by Valentin Deniaud 2 months ago

misc: fix logging-too-many-args pylint error (#56982)

Revision 8a26fc20 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix consider-using-from-import pylint error (#56982)

Revision 9fc2e294 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix simplifiable-if-statement pylint error (#56982)

Revision a4b9e51d (diff)
Added by Valentin Deniaud 2 months ago

misc: fix consider-using-ternary pylint error (#56982)

Revision 1af44166 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix useless-return pylint error (#56982)

Revision 2a8c0630 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix consider-using-in pylint error (#56982)

Revision fdb8b20b (diff)
Added by Valentin Deniaud 2 months ago

misc: fix no-else-raise pylint error (#56982)

Revision 19aaa8ab (diff)
Added by Valentin Deniaud 2 months ago

misc: fix no-else-break pylint error (#56982)

Revision d79c563c (diff)
Added by Valentin Deniaud 2 months ago

misc: fix consider-using-in pylint error (#56982)

Revision ea52280a (diff)
Added by Valentin Deniaud 2 months ago

misc: fix no-else-continue pylint error (#56982)

Revision 9d51d980 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix consider-using-with pylint error (#56982)

Revision b5b6fbdc (diff)
Added by Valentin Deniaud 2 months ago

misc: fix use-dict-literal pylint error (#56982)

Revision c5b69b9c (diff)
Added by Valentin Deniaud 2 months ago

misc: fix dangerous-default-value pylint error (#56982)

Revision 904dce76 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix pointless-statement pylint error (#56982)

Revision 15436a68 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix pointless-string-statement pylint error (#56982)

Revision d8553c5b (diff)
Added by Valentin Deniaud 2 months ago

misc: fix unnecessary-pass pylint error (#56982)

Revision 5624807d (diff)
Added by Valentin Deniaud 2 months ago

misc: fix unnecessary-lambda pylint error (#56982)

Revision b4c3bb96 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix eval-used pylint error (#56982)

Revision eda115a0 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix comparison-with-callable pylint error (#56982)

Revision 31d68f07 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix useless-super-delegation pylint error (#56982)

Revision 3903a337 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix arguments-renamed pylint error (#56982)

Revision 3ed55f58 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix wildcard-import pylint error (#56982)

Revision 647af66a (diff)
Added by Valentin Deniaud 2 months ago

misc: fix reimported pylint error (#56982)

Revision 0f93f4b0 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix global-variable-not-assigned pylint error (#56982)

Revision d52fd290 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix global-statement pylint error (#56982)

Revision f3e5f4da (diff)
Added by Valentin Deniaud 2 months ago

misc: fix unused-import pylint error (#56982)

Revision e0b86a76 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix unused-variable pylint error (#56982)

Revision 292d6d3a (diff)
Added by Valentin Deniaud 2 months ago

misc: fix unused-wildcard-import pylint error (#56982)

Revision 8f9c967d (diff)
Added by Valentin Deniaud 2 months ago

misc: fix unbalanced-tuple-unpacking pylint error (#56982)

Revision 19c5e7b1 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix try-except-raise pylint error (#56982)

Revision be73f648 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix raising-format-tuple pylint error (#56982)

Revision 61db86ff (diff)
Added by Valentin Deniaud 2 months ago

misc: fix logging-not-lazy pylint error (#56982)

Revision 72723288 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix logging-fstring-interpolation pylint error (#56982)

Revision 0748fae9 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix f-string-without-interpolation pylint error (#56982)

Revision 9babcb4b (diff)
Added by Valentin Deniaud 2 months ago

misc: fix redundant-unittest-assert pylint error (#56982)

Revision 3bfe24a4 (diff)
Added by Valentin Deniaud 2 months ago

misc: fix deprecated-method pylint error (#56982)

History

#1

Updated by Valentin Deniaud 3 months ago

Voilà, je veux bien que ce soit regardé rapidement pour que je puisse pousser ça en tout début de cycle, les rebases s'annonçant relous.

#2

Updated by Frédéric Péters (absent jusqu’au 12/12) 3 months ago

Dans misc: fix pointless-statement pylint error,

                     self.ldap(command, attrs)
-                    state == COMMAND
                     attrs = {}

ça devrait être state = COMMAND.

misc: fixundefined-variable pylint error un espace manquant dans le sujet de ce commit.

(voilà pour une lecture un peu au-delà du survol).

#3

Updated by Valentin Deniaud 3 months ago

Merci, branche à jour.

#4

Updated by Benjamin Dauvergne 2 months ago

Valentin Deniaud a écrit :

Merci, branche à jour.

Je préfère que pylint reste une cible à part de tox, mais la commande peut être simplifié bien sûr (pylint.sh me semble toujours inutile je comprends que c'est pour ne pas pourrir les logs dans jenkins, ok).


  • misc: fix assignment-from-no-return pylint error (#56982)
diff --git a/src/authentic2/manager/user_views.py b/src/authentic2/manager/user_views.py
index 57ea081..1fa7d56 100644
--- a/src/authentic2/manager/user_views.py
+++ b/src/authentic2/manager/user_views.py
@@ -666,8 +666,8 @@ class UserRolesView(HideOUColumnMixin, BaseSubTableView):
             qs = list(qs)
         return qs

-    def authorize(self, request, *args, **kwargs):
-        response = super().authorize(request, *args, **kwargs)
+    def dispatch(self, request, *args, **kwargs):
+        response = super().dispatch(request, *args, **kwargs)  # pylint: disable=assignment-from-no-return
         if response is not None:
             return response
         if not UserDetailView.has_perm_on_roles(request.user, self.object):
diff --git a/src/authentic2/manager/views.py b/src/authentic2/manager/views.py
index 9446d8e..8a6c5c5 100644
--- a/src/authentic2/manager/views.py
+++ b/src/authentic2/manager/views.py
@@ -119,7 +119,7 @@ class PermissionMixin:
                     raise PermissionDenied

     def dispatch(self, request, *args, **kwargs):
-        response = self.authorize(request, *args, **kwargs)
+        response = self.authorize(request, *args, **kwargs)  # pylint: disable=assignment-from-no-return
         if response is not None:
             return response
         return super().dispatch(request, *args, **kwargs)

Je pense qu'il faut juste ajouter return None dans la méthode authorize de base, pour que pylint comprenne qu'un retour est possible (ça vient de e4e1bccdf335)


  • misc: fix no-value-for-parameter pylint error (#56982)

auth2-ssl est du code mort ça peut être juste viré.


  • misc: fix comparison-with-callable pylint error (#56982)
                 kind = attribute.get_kind()
+                # pylint: disable=comparison-with-callable
                 if kind['serialize'] == attribute_kinds.identity:

Là je pense que ça appelle juste un remplacement par is.

#5

Updated by Valentin Deniaud 2 months ago

Benjamin Dauvergne a écrit :

Je préfère que pylint reste une cible à part de tox

Le problème c'est que pylint a besoin de toutes les dépendances d'authentic pour fonctionner, afin de checker les imports. Donc il faut qu'il soit dans la même cible, si il y a une manière d'hériter les dépendances d'une cible à l'autre je ne la connais pas ; ça m'amènerait de toute façon à dire que je préfère avoir la même conf que dans les autres briques plutôt qu'un truc bizarre spécifique a2.

Je pense qu'il faut juste ajouter return None

Non sinon tu te prends une erreur useless-return. De toute façon je trouve le code concerné vraiment pas clair, ça demanderait un bon refactoring et les disable pylint font un bon job à le souligner.

auth2-ssl est du code mort ça peut être juste viré.

Mmmh, pas de code mais les migrations sont encore là, j'ai peur de l'anguille sous le caillou. Il y a déjà suffisamment d'occasion que quelque chose pète avec les changements introduits ici, laissons ça pour un autre ticket.

Là je pense que ça appelle juste un remplacement par is.

Bien vu, branche à jour.

#6

Updated by Benjamin Dauvergne 2 months ago

Le mer. 22 sept. 2021 à 14:29, <> a écrit :

Benjamin Dauvergne a écrit :

Je préfère que pylint reste une cible à part de tox

Le problème c'est que pylint a besoin de toutes les dépendances d'authentic pour fonctionner, afin de checker les imports. Donc il faut qu'il soit dans la même cible, si il y a une manière d'hériter les dépendances d'une cible à l'autre je ne la connais pas ; ça m'amènerait de toute façon à dire que je préfère avoir la même conf que dans les autres briques plutôt qu'un truc bizarre spécifique a2.

Les dépendances d'a2 sont dans le setup.py, quelles dépendances vois-tu qui n'y seraient pas ? Pour les dépendances explicites des tests, ça représente très peu de choses qu'on peut rajouter :
  • django_webtest
  • faker
  • httmock
  • lxml
  • ldaptools
  • pyquery

Mais plutôt que de faire la liste ça peut très bien aller dans un fichier test_requirements.txt, ça s'utilise avec -r dans tox; je vais ouvrir un ticket pour ça.

Je pense qu'il faut juste ajouter return None

Non sinon tu te prends une erreur useless-return. De toute façon je trouve le code concerné vraiment pas clair, ça demanderait un bon refactoring et les disable pylint font un bon job à le souligner.

Je ne comprends pas bien ce qu'il y a d'exotique en général et en particulier pour pylint, c'est un code classique avec Django qui répond un HttpResponse pour intercepter le traitement ou None pour laisser la suite continuer; les middleware process_request ou process_view fonctionnent ainsi aussi, mais c'est peut-être pylint dont l'analyse est un peu naze.

auth2-ssl est du code mort ça peut être juste viré.

Mmmh, pas de code mais les migrations sont encore là, j'ai peur de l'anguille sous le caillou. Il y a déjà suffisamment d'occasion que quelque chose pète avec les changements introduits ici, laissons ça pour un autre ticket.

L'application n'est plus déclaré dans INSTALLED_APPS, il n'y a aucun risque, mais ok pour un autre ticket.

#7

Updated by Valentin Deniaud 2 months ago

Benjamin Dauvergne a écrit :

Je préfère que pylint reste une cible à part de tox

OK, branche à jour avec ça.

#8

Updated by Benjamin Dauvergne 2 months ago

  • Status changed from Solution proposée to Solution validée

Go, à pousser demain.

#9

Updated by Valentin Deniaud 2 months ago

  • Status changed from Solution validée to Résolu (à déployer)
commit 3bfe24a4b6bdcb14ac1a8d9a275da05a37ec5328
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 15:42:28 2021 +0200

    misc: fix deprecated-method pylint error (#56982)

commit 9babcb4b965c953df73f26d9a34b1c5a1cc58cd8
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 15:38:15 2021 +0200

    misc: fix redundant-unittest-assert pylint error (#56982)

commit 0748fae9a16e62b90dc79a868776b04514cd8e44
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 15:36:10 2021 +0200

    misc: fix f-string-without-interpolation pylint error (#56982)

commit 72723288032ea252347525e1cb866ab0b1be4ffb
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 15:35:53 2021 +0200

    misc: fix logging-fstring-interpolation pylint error (#56982)

commit 61db86fffb56ea56095c5f96181c50f3b929df3c
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 15:34:33 2021 +0200

    misc: fix logging-not-lazy pylint error (#56982)

commit be73f648c44ae0a4ef7a88a5f579c6b0f2d4fa4b
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 15:27:40 2021 +0200

    misc: fix raising-format-tuple pylint error (#56982)

commit 19c5e7b1811a366f18a8f5d5188bd6f3077c013b
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 15:27:22 2021 +0200

    misc: fix try-except-raise pylint error (#56982)

commit 8f9c967dee65e65c26da22b4dd63c2f2522bbd12
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 15:22:54 2021 +0200

    misc: fix unbalanced-tuple-unpacking pylint error (#56982)

commit 292d6d3a78f682af7b8cd6c262899f24bd827c3a
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 15:08:50 2021 +0200

    misc: fix unused-wildcard-import pylint error (#56982)

commit e0b86a7691ed0ce726c06e077c812fe8763ce920
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 12:12:58 2021 +0200

    misc: fix unused-variable pylint error (#56982)

commit f3e5f4dab64ace3d8fe27f2fbea3eaacd307c715
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 12:08:47 2021 +0200

    misc: fix unused-import pylint error (#56982)

commit d52fd290a3a9eedfdd654e94b466e784ae8f77e4
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 11:41:30 2021 +0200

    misc: fix global-statement pylint error (#56982)

commit 0f93f4b0e8c279ca6f84766a47e0b806c3bea3cb
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 11:37:44 2021 +0200

    misc: fix global-variable-not-assigned pylint error (#56982)

commit 647af66a5f290e72b2566259ad4d90abb4d151c6
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 11:31:27 2021 +0200

    misc: fix reimported pylint error (#56982)

commit 3ed55f583a2d26a04c74e9a39b43c8207933548d
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 11:26:37 2021 +0200

    misc: fix wildcard-import pylint error (#56982)

commit 3903a337a49ceda947c4da107855b1981d5ba627
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 11:26:03 2021 +0200

    misc: fix arguments-renamed pylint error (#56982)

commit 31d68f072df36dad6de540b2e5c44865f803245d
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 11:07:25 2021 +0200

    misc: fix useless-super-delegation pylint error (#56982)

commit eda115a0d5e80e08c8dd4f0ed75ac41708de86cf
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 11:07:06 2021 +0200

    misc: fix comparison-with-callable pylint error (#56982)

commit b4c3bb96160d0824d0b80cef4a2b34c23e3412c0
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 11:05:20 2021 +0200

    misc: fix eval-used pylint error (#56982)

commit 5624807d54797705d60bacce8335efa8c2e1c653
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 11:04:44 2021 +0200

    misc: fix unnecessary-lambda pylint error (#56982)

commit d8553c5b910e55b30d3a4a94bb03503c77365c1c
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 11:00:34 2021 +0200

    misc: fix unnecessary-pass pylint error (#56982)

commit 15436a68d9e180c9234cd0efa97c797e2c3b2100
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 10:59:49 2021 +0200

    misc: fix pointless-string-statement pylint error (#56982)

commit 904dce7655186f1e61c5e96e0669db1a4f83fcfb
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 10:54:41 2021 +0200

    misc: fix pointless-statement pylint error (#56982)

commit c5b69b9c41107f40a242d6cf492d89b5bfb08b28
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 10:46:40 2021 +0200

    misc: fix dangerous-default-value pylint error (#56982)

commit b5b6fbdca04758f6496dac79f884daf678e7e19e
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 10:34:57 2021 +0200

    misc: fix use-dict-literal pylint error (#56982)

commit 9d51d9809a5f132437741ccb99e99e08a2bf96ce
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Tue Sep 21 10:18:10 2021 +0200

    misc: fix consider-using-with pylint error (#56982)

commit ea52280a07ce49c4752c794e29ab895dd02a71d5
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 18:08:03 2021 +0200

    misc: fix no-else-continue pylint error (#56982)

commit d79c563c290ae182d8ac9720269966113ba43eb2
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 18:06:40 2021 +0200

    misc: fix consider-using-in pylint error (#56982)

commit 19aaa8ab98cfadf1a16585e5fc0954a1783c4e19
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 16:38:53 2021 +0200

    misc: fix no-else-break pylint error (#56982)

commit fdb8b20b5b877c5bf53f95ef36d701fe39882359
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 16:37:56 2021 +0200

    misc: fix no-else-raise pylint error (#56982)

commit 2a8c063012c4b02fe548efb52f0ae7be22cc389f
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 16:36:13 2021 +0200

    misc: fix consider-using-in pylint error (#56982)

commit 1af441661266deb0b3a819198ba128edce833a87
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 16:35:24 2021 +0200

    misc: fix useless-return pylint error (#56982)

commit a4b9e51dc1aea8e0e18c525ddaf57847d1559078
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 16:35:04 2021 +0200

    misc: fix consider-using-ternary pylint error (#56982)

commit 9fc2e2946486401c0001cc203f4f2e4bc9eeaea4
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 16:33:47 2021 +0200

    misc: fix simplifiable-if-statement pylint error (#56982)

commit 8a26fc20d323ef2347eca0bb3f62f200e31830d9
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 16:31:46 2021 +0200

    misc: fix consider-using-from-import pylint error (#56982)

commit 1a08018f84c2f93e5934aa66a18e6ebaf2eaf713
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 16:27:50 2021 +0200

    misc: fix logging-too-many-args pylint error (#56982)

commit 2071defb19df27b3a545de5242ed14598e60bd3d
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 16:12:38 2021 +0200

    misc: fix no-value-for-parameter pylint error (#56982)

commit 36a31d9d2af1bb9a765d9022ff0edf3162c662ee
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 16:00:45 2021 +0200

    misc: fix assignment-from-no-return pylint error (#56982)

commit e2647e6481800cab408aa745e6960790d72ec156
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 15:48:38 2021 +0200

    misc: fix undefined-variable pylint error (#56982)

commit b49ea2ea0cfdc136bbe6d2174c509c4f315daf70
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 15:34:29 2021 +0200

    misc: fix used-before-assignment pylint error (#56982)

commit 9d7aa5d839f5afa6b7b8e7dcc1693bf5f45e51de
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 15:31:43 2021 +0200

    misc: fix import-error pylint error (#56982)

commit 3e5fc8a89891541d8fbacfb99e96209c6aa76001
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 15:18:23 2021 +0200

    misc: fix invalid-str-returned pylint error (#56982)

commit df66d77b6b47ac76cbcbb16933c37052ca99ebe0
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 15:09:15 2021 +0200

    misc: fix no-self-argument pylint error (#56982)

commit e3adcd05583dc43c7153c4b2b7fb0316ad588e10
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 15:08:47 2021 +0200

    misc: fix access-member-before-definition pylint error (#56982)

commit f4ae48c1bf55cb54b100830cc3e730b50aa258cc
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 15:01:44 2021 +0200

    misc: fix function-redefined pylint error (#56982)

commit 2d0b05c5f9c6993f437863b04dfc76e4cb1cbd80
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 14:50:26 2021 +0200

    misc: fix return-in-init pylint error (#56982)

commit 3b6cfa5146adb1fe57ed08e65cbc8d697e4b49f7
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 14:50:03 2021 +0200

    misc: fix len-as-condition pylint error (#56982)

commit 2c5acd16bbfaa6a16ce97c05bac00b35391dc465
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 14:45:56 2021 +0200

    misc: fix ungrouped-imports pylint error (#56982)

commit 7fd28d4c10cafe130466b8cb3a35a544da22af82
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 14:41:41 2021 +0200

    misc: fix wrong-import-order pylint error (#56982)

commit f20fa532941fe9612cb1d0b41a3b145e44405982
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 14:41:14 2021 +0200

    misc: fix line-too-long pylint error (#56982)

commit aabe4af2523c1a9560442318587cbf104c829360
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 14:31:10 2021 +0200

    misc: fix consider-using-dict-items pylint error (#56982)

commit f3609da8f6cb139345e371cd1c133e0cc7eaa67e
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 12:26:29 2021 +0200

    misc: fix bad-classmethod-argument pylint error (#56982)

commit fa778299640f2b16d75590c4f004540edcc1f1e4
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 11:54:11 2021 +0200

    misc: fix unidiomatic-typecheck pylint error (#56982)

commit a47bce508603332b9af6a1853295e000d05dc22d
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 11:52:47 2021 +0200

    misc: fix misplaced-comparison-constant pylint error (#56982)

commit 42f0a4361c6a04ad99a3be0478945d2b2578649b
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 11:51:08 2021 +0200

    misc: fix singleton-comparison pylint error (#56982)

commit a2d8680e295745ff10698b1af7c9f59b3d651f9c
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 11:50:02 2021 +0200

    misc: fix empty-docstrings pylint error (#56982)

commit 7406f4e9f0d8e03082138bfdcdab2d4706ded2b5
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 16:11:50 2021 +0200

    decorators: remove broken and unused decorator (#56982)

commit 716a3599075b730b9dfa9d8dd0b8b2711e3c56ef
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Mon Sep 20 16:26:24 2021 +0200

    tests: replace norequest decorator by explicit function (#56982)

commit e2079747b7cbe9ed8ea522117832effa56b76181
Author: Valentin Deniaud <vdeniaud@entrouvert.com>
Date:   Thu Sep 16 16:45:27 2021 +0200

    misc: update pylint configuration (#56982)
#10

Updated by Frédéric Péters (absent jusqu’au 12/12) 2 months ago

  • Status changed from Résolu (à déployer) to Solution déployée

Also available in: Atom PDF