Projet

Général

Profil

Development #55505

Faire planter le build jenkins sur une erreur pylint

Ajouté par Lauréline Guérin il y a presque 3 ans. Mis à jour il y a presque 3 ans.

Statut:
Fermé
Priorité:
Bas
Assigné à:
Catégorie:
-
Version cible:
-
Début:
09 juillet 2021
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

faire un sort aux erreur pylint, et faire en sorte qu'on n'en introduise plus en faisant planter le build jenkins


Fichiers

0010-misc-fix-wrong-import-position-pylint-error-55505.patch (786 octets) 0010-misc-fix-wrong-import-position-pylint-error-55505.patch Lauréline Guérin, 12 juillet 2021 11:23
0009-misc-fix-consider-using-with-pylint-error-55505.patch (2,93 ko) 0009-misc-fix-consider-using-with-pylint-error-55505.patch Lauréline Guérin, 12 juillet 2021 11:23
0008-misc-fix-misplaced-comparison-constant-pylint-error-.patch (1,26 ko) 0008-misc-fix-misplaced-comparison-constant-pylint-error-.patch Lauréline Guérin, 12 juillet 2021 11:23
0007-misc-fix-function-redefined-pylint-error-55505.patch (1,47 ko) 0007-misc-fix-function-redefined-pylint-error-55505.patch Lauréline Guérin, 12 juillet 2021 11:23
0006-misc-fix-useless-object-inheritance-pylint-error-555.patch (4,59 ko) 0006-misc-fix-useless-object-inheritance-pylint-error-555.patch Lauréline Guérin, 12 juillet 2021 11:23
0005-misc-fix-super-with-arguments-pylint-error-55505.patch (25,6 ko) 0005-misc-fix-super-with-arguments-pylint-error-55505.patch Lauréline Guérin, 12 juillet 2021 11:23
0004-misc-fix-unused-variable-pylint-error-55505.patch (30,7 ko) 0004-misc-fix-unused-variable-pylint-error-55505.patch Lauréline Guérin, 12 juillet 2021 11:23
0003-misc-fix-unused-import-pylint-error-55505.patch (6,39 ko) 0003-misc-fix-unused-import-pylint-error-55505.patch Lauréline Guérin, 12 juillet 2021 11:23
0002-build-make-it-fail-in-case-of-pylint-warnings-55505.patch (635 octets) 0002-build-make-it-fail-in-case-of-pylint-warnings-55505.patch Lauréline Guérin, 12 juillet 2021 11:23
0001-misc-integrate-pylint.rc-in-repo-55505.patch (4,02 ko) 0001-misc-integrate-pylint.rc-in-repo-55505.patch Lauréline Guérin, 12 juillet 2021 11:23
0020-misc-fix-misplaced-comparison-constant-pylint-error-.patch (3,05 ko) 0020-misc-fix-misplaced-comparison-constant-pylint-error-.patch Lauréline Guérin, 12 juillet 2021 11:24
0019-misc-fix-singleton-comparison-pylint-error-55505.patch (3,67 ko) 0019-misc-fix-singleton-comparison-pylint-error-55505.patch Lauréline Guérin, 12 juillet 2021 11:24
0018-misc-fix-parse-error-pylint-error-55505.patch (471 octets) 0018-misc-fix-parse-error-pylint-error-55505.patch Lauréline Guérin, 12 juillet 2021 11:24
0017-misc-fix-simplifiable-if-expression-pylint-error-555.patch (983 octets) 0017-misc-fix-simplifiable-if-expression-pylint-error-555.patch Lauréline Guérin, 12 juillet 2021 11:24
0016-misc-fix-dangerous-default-value-pylint-error-55505.patch (1,55 ko) 0016-misc-fix-dangerous-default-value-pylint-error-55505.patch Lauréline Guérin, 12 juillet 2021 11:24
0015-misc-fix-undefined-loop-variable-pylint-error-55505.patch (948 octets) 0015-misc-fix-undefined-loop-variable-pylint-error-55505.patch Lauréline Guérin, 12 juillet 2021 11:24
0014-misc-fix-no-name-in-module-pylint-error-55505.patch (5,01 ko) 0014-misc-fix-no-name-in-module-pylint-error-55505.patch Lauréline Guérin, 12 juillet 2021 11:24
0013-misc-fix-consider-using-max-builtin-pylint-error-555.patch (1,17 ko) 0013-misc-fix-consider-using-max-builtin-pylint-error-555.patch Lauréline Guérin, 12 juillet 2021 11:24
0012-misc-fix-no-else-raise-pylint-error-55505.patch (2,07 ko) 0012-misc-fix-no-else-raise-pylint-error-55505.patch Lauréline Guérin, 12 juillet 2021 11:24
0011-misc-fix-line-too-long-pylint-error-55505.patch (1,28 ko) 0011-misc-fix-line-too-long-pylint-error-55505.patch Lauréline Guérin, 12 juillet 2021 11:24
0023-misc-fix-unidiomatic-typecheck-pylint-error-55505.patch (1,19 ko) 0023-misc-fix-unidiomatic-typecheck-pylint-error-55505.patch Lauréline Guérin, 12 juillet 2021 11:24
0022-misc-fix-expression-not-assigned-pylint-error-55505.patch (1,76 ko) 0022-misc-fix-expression-not-assigned-pylint-error-55505.patch Lauréline Guérin, 12 juillet 2021 11:24
0021-misc-fix-import-error-pylint-error-55505.patch (6,12 ko) 0021-misc-fix-import-error-pylint-error-55505.patch Lauréline Guérin, 12 juillet 2021 11:24
0004-misc-fix-unused-variable-pylint-error-55505.patch (30,5 ko) 0004-misc-fix-unused-variable-pylint-error-55505.patch Lauréline Guérin, 15 juillet 2021 15:04

Révisions associées

Révision bf9914ee (diff)
Ajouté par Lauréline Guérin il y a presque 3 ans

misc: integrate pylint.rc in repo (#55505)

Révision 702982e8 (diff)
Ajouté par Lauréline Guérin il y a presque 3 ans

build: make it fail in case of pylint warnings (#55505)

Révision 4b836e70 (diff)
Ajouté par Lauréline Guérin il y a presque 3 ans

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

Révision 9fd102df (diff)
Ajouté par Lauréline Guérin il y a presque 3 ans

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

Révision 4f56ef41 (diff)
Ajouté par Lauréline Guérin il y a presque 3 ans

misc: fix super-with-arguments pylint error (#55505)

Révision dccfc33a (diff)
Ajouté par Lauréline Guérin il y a presque 3 ans

misc: fix useless-object-inheritance pylint error (#55505)

Révision 86b37ebf (diff)
Ajouté par Lauréline Guérin il y a presque 3 ans

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

Révision 5bc1f273 (diff)
Ajouté par Lauréline Guérin il y a presque 3 ans

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

Révision 077ac59d (diff)
Ajouté par Lauréline Guérin il y a presque 3 ans

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

Révision 81a93fc2 (diff)
Ajouté par Lauréline Guérin il y a presque 3 ans

misc: fix wrong-import-position pylint error (#55505)

Révision 46529992 (diff)
Ajouté par Lauréline Guérin il y a presque 3 ans

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

Révision 25da6b2a (diff)
Ajouté par Lauréline Guérin il y a presque 3 ans

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

Révision 0424972f (diff)
Ajouté par Lauréline Guérin il y a presque 3 ans

misc: fix consider-using-max-builtin pylint error (#55505)

Révision 5115aa32 (diff)
Ajouté par Lauréline Guérin il y a presque 3 ans

misc: fix no-name-in-module pylint error (#55505)

Révision b6952a21 (diff)
Ajouté par Lauréline Guérin il y a presque 3 ans

misc: fix undefined-loop-variable pylint error (#55505)

Révision f9cd7603 (diff)
Ajouté par Lauréline Guérin il y a presque 3 ans

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

Révision 9fe926f9 (diff)
Ajouté par Lauréline Guérin il y a presque 3 ans

misc: fix simplifiable-if-expression pylint error (#55505)

Révision 51c5a743 (diff)
Ajouté par Lauréline Guérin il y a presque 3 ans

misc: fix parse-error pylint error (#55505)

Révision 5fd95598 (diff)
Ajouté par Lauréline Guérin il y a presque 3 ans

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

Révision 05c6d6b2 (diff)
Ajouté par Lauréline Guérin il y a presque 3 ans

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

Révision 37d385da (diff)
Ajouté par Lauréline Guérin il y a presque 3 ans

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

Révision 4ab584da (diff)
Ajouté par Lauréline Guérin il y a presque 3 ans

misc: fix expression-not-assigned pylint error (#55505)

Révision 528b099e (diff)
Ajouté par Lauréline Guérin il y a presque 3 ans

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

Historique

#1

Mis à jour par Lauréline Guérin il y a presque 3 ans

  • Priorité changé de Normal à Bas
#5

Mis à jour par Paul Marillonnet il y a presque 3 ans

Je comprends pas trop la logique de certaines modifications dans 0004. Par exemple on a

-        desk, created = Desk.objects.get_or_create(
-            label='Guichet 1', slug='guichet-1', agenda=time_period.agenda
-        )
+        desk, _ = Desk.objects.get_or_create(label='Guichet 1', slug='guichet-1', agenda=time_period.agenda)

mais un peu plus loin
-        desk, created = cls.objects.update_or_create(slug=data['slug'], agenda=data['agenda'], defaults=data)
+        desk = cls.objects.update_or_create(slug=data['slug'], agenda=data['agenda'], defaults=data)[0]

Est-ce qu’il y a moyen de dire à pylint de privilégier l’une des deux formes ?

#6

Mis à jour par Frédéric Péters il y a presque 3 ans

Est-ce qu’il y a moyen de dire à pylint de privilégier l’une des deux formes ?

Ce n'est pas pylint qui modifie le code.

#7

Mis à jour par Paul Marillonnet il y a presque 3 ans

Frédéric Péters a écrit :

Est-ce qu’il y a moyen de dire à pylint de privilégier l’une des deux formes ?

Ce n'est pas pylint qui modifie le code.

Je voulais dire, ne tolérer qu’une des deux formes.

#8

Mis à jour par Lauréline Guérin il y a presque 3 ans

-        desk, created = Desk.objects.get_or_create(
-            label='Guichet 1', slug='guichet-1', agenda=time_period.agenda
-        )
+        desk, _ = Desk.objects.get_or_create(label='Guichet 1', slug='guichet-1', agenda=time_period.agenda)

Ca doit être dans un test ? dans les tests la function _ n'est pas définie, alors que dans le code c'est gettext_lazy; j'aurais pu mettre dummy à la place de _ et coller ça partout.
#9

Mis à jour par Paul Marillonnet il y a presque 3 ans

Lauréline Guerin a écrit :

[...]
Ca doit être dans un test ? dans les tests la function _ n'est pas définie, alors que dans le code c'est gettext_lazy; j'aurais pu mettre dummy à la place de _ et coller ça partout.

(Perso oui je trouve que le tuple unpacking explicite avec une variable dummy est plus pythonique.)

#11

Mis à jour par Paul Marillonnet il y a presque 3 ans

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

Top.

#12

Mis à jour par Lauréline Guérin il y a presque 3 ans

  • Statut changé de Solution validée à Résolu (à déployer)
commit 528b099e0b55cfbbf65c7a555541e211b43a3e39
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Fri Jul 9 17:56:30 2021 +0200

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

commit 4ab584daa489cdb776b90d9ba52a88771937d0a9
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Fri Jul 9 17:55:04 2021 +0200

    misc: fix expression-not-assigned pylint error (#55505)

commit 37d385daced531061bd7209cbae4b5d8958839d5
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Fri Jul 9 17:53:42 2021 +0200

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

commit 05c6d6b26b6dc961ad2260e62043b2c681b470e6
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Fri Jul 9 17:50:07 2021 +0200

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

commit 5fd955989cb09efd9b689f4fb607910237b296dc
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Fri Jul 9 17:45:28 2021 +0200

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

commit 51c5a7437d7d346af7c314b27aaeb298581922f8
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Fri Jul 9 17:12:13 2021 +0200

    misc: fix parse-error pylint error (#55505)

commit 9fe926f9cee6d6581c27fe17a1c29bf6a523906a
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Fri Jul 9 17:10:21 2021 +0200

    misc: fix simplifiable-if-expression pylint error (#55505)

commit f9cd7603017a58c8a63f1592f97e492294550d8a
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Fri Jul 9 17:09:41 2021 +0200

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

commit b6952a21c50561e672c5fe3eac025c74bced1a26
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Fri Jul 9 16:59:06 2021 +0200

    misc: fix undefined-loop-variable pylint error (#55505)

commit 5115aa32c20e1b25fb11e3533f477cff188b60b9
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Fri Jul 9 16:55:28 2021 +0200

    misc: fix no-name-in-module pylint error (#55505)

commit 0424972fcf4b7843a07604eb51e13ae90ea13e26
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Fri Jul 9 16:41:33 2021 +0200

    misc: fix consider-using-max-builtin pylint error (#55505)

commit 25da6b2a740d28e18d5b0a26ac57ea05d45d5061
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Fri Jul 9 16:24:00 2021 +0200

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

commit 46529992c2a480110aa8a9198b377c3eb6b597d0
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Fri Jul 9 16:20:43 2021 +0200

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

commit 81a93fc2ee99856c5f00efd64487f00c80dbe78b
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Fri Jul 9 16:19:27 2021 +0200

    misc: fix wrong-import-position pylint error (#55505)

commit 077ac59dfa6ac2c93adec542d17792dadbaac99a
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Fri Jul 9 16:16:57 2021 +0200

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

commit 5bc1f273da25d434657586b9a4a99a7c44fccd61
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Fri Jul 9 16:11:35 2021 +0200

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

commit 86b37ebf734bda07b1ac74a47398f2ec7446cf27
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Fri Jul 9 16:09:58 2021 +0200

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

commit dccfc33acf990088cf6ab9d7dbcf488bd9e09091
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Fri Jul 9 16:04:34 2021 +0200

    misc: fix useless-object-inheritance pylint error (#55505)

commit 4f56ef4167fbae474ba785f64bda7f6c4badacc4
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Fri Jul 9 16:01:42 2021 +0200

    misc: fix super-with-arguments pylint error (#55505)

commit 9fd102df87453645dfe839ba12bf3963315e5d8a
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Fri Jul 9 15:41:40 2021 +0200

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

commit 4b836e70def76538ed7b03abf76683fd83b5c761
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Fri Jul 9 15:34:03 2021 +0200

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

commit 702982e8f1ccc24416d1fef363537ef68f6e5a76
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Fri Jul 9 15:22:32 2021 +0200

    build: make it fail in case of pylint warnings (#55505)

commit bf9914eecf3aaad0a26a1fb1fa84df89e55f4d8b
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Fri Jul 9 14:52:11 2021 +0200

    misc: integrate pylint.rc in repo (#55505)
#13

Mis à jour par Frédéric Péters il y a presque 3 ans

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

Formats disponibles : Atom PDF