review/pylint #17

Closed
Fred wants to merge 0 commits from review/pylint into master
Collaborator

Voilou.
J'ai revu la majorité des remarques de Pylint.

Il reste celles-ci:

************* Module objective.admin
ultron/objective/admin.py:124:5: W0511: TODO: ne proposer QUE les SKILL comme educatif (fixme)
************* Module objective.views
ultron/objective/views.py:37:11: R5102: Instead of HttpResponse(content_type='application/json') use JsonResponse() (http-response-with-content-type-json)
ultron/objective/views.py:144:11: R5102: Instead of HttpResponse(content_type='application/json') use JsonResponse() (http-response-with-content-type-json)
ultron/objective/views.py:193:4: R1731: Consider using 'level = max(level, level)' instead of unnecessary if block (consider-using-max-builtin)
************* Module core.views
ultron/core/views.py:40:23: W0703: Catching too general exception Exception (broad-except)
************* Module location.views
ultron/location/views.py:43:11: R5102: Instead of HttpResponse(content_type='application/json') use JsonResponse() (http-response-with-content-type-json)
ultron/location/views.py:61:11: R5102: Instead of HttpResponse(content_type='application/json') use JsonResponse() (http-response-with-content-type-json)
ultron/location/views.py:143:11: R5102: Instead of HttpResponse(content_type='application/json') use JsonResponse() (http-response-with-content-type-json)
ultron/location/views.py:173:29: W0613: Unused argument 'clubid' (unused-argument)
************* Module planning.models
ultron/planning/models.py:88:0: C0103: Class name "Event_Participation" doesn't conform to PascalCase naming style (invalid-name)
************* Module planning.views
ultron/planning/views.py:45:11: R5102: Instead of HttpResponse(content_type='application/json') use JsonResponse() (http-response-with-content-type-json)
ultron/planning/views.py:94:4: W0702: No exception type(s) specified (bare-except)
ultron/planning/views.py:116:4: W0702: No exception type(s) specified (bare-except)
************* Module tools.models
ultron/tools/models.py:63:4: W0221: Number of parameters was 1 in 'QuerySet.last' and is now 2 in overridden 'TemporizableQuerySet.last' method (arguments-differ)
************* Module people.views
ultron/people/views.py:47:11: R5102: Instead of HttpResponse(content_type='application/json') use JsonResponse() (http-response-with-content-type-json)
************* Module profiles.views
ultron/profiles/views.py:23:11: W0703: Catching too general exception Exception (broad-except)

------------------------------------------------------------------
Your code has been rated at 9.90/10 (previous run: 9.89/10, +0.01)

Il y en a certaines pour lesquelles je ne sais rien faire, d'autres où je ne suis pas sûr de l'impact derrière (genre, la méthode last() que tu surcharges sur l'un des managers) et certaines pour lesquelles je n'ai pas envie de chercher 😙 - les "catching too general exception".

A priori, tu peux merger sans trop de soucis, mais jette quand même un oeil sur ce que j'ai fait, au moins pour comprendre pourquoi je l'ai fait.

Voilou. J'ai revu la majorité des remarques de Pylint. Il reste celles-ci: ``` ************* Module objective.admin ultron/objective/admin.py:124:5: W0511: TODO: ne proposer QUE les SKILL comme educatif (fixme) ************* Module objective.views ultron/objective/views.py:37:11: R5102: Instead of HttpResponse(content_type='application/json') use JsonResponse() (http-response-with-content-type-json) ultron/objective/views.py:144:11: R5102: Instead of HttpResponse(content_type='application/json') use JsonResponse() (http-response-with-content-type-json) ultron/objective/views.py:193:4: R1731: Consider using 'level = max(level, level)' instead of unnecessary if block (consider-using-max-builtin) ************* Module core.views ultron/core/views.py:40:23: W0703: Catching too general exception Exception (broad-except) ************* Module location.views ultron/location/views.py:43:11: R5102: Instead of HttpResponse(content_type='application/json') use JsonResponse() (http-response-with-content-type-json) ultron/location/views.py:61:11: R5102: Instead of HttpResponse(content_type='application/json') use JsonResponse() (http-response-with-content-type-json) ultron/location/views.py:143:11: R5102: Instead of HttpResponse(content_type='application/json') use JsonResponse() (http-response-with-content-type-json) ultron/location/views.py:173:29: W0613: Unused argument 'clubid' (unused-argument) ************* Module planning.models ultron/planning/models.py:88:0: C0103: Class name "Event_Participation" doesn't conform to PascalCase naming style (invalid-name) ************* Module planning.views ultron/planning/views.py:45:11: R5102: Instead of HttpResponse(content_type='application/json') use JsonResponse() (http-response-with-content-type-json) ultron/planning/views.py:94:4: W0702: No exception type(s) specified (bare-except) ultron/planning/views.py:116:4: W0702: No exception type(s) specified (bare-except) ************* Module tools.models ultron/tools/models.py:63:4: W0221: Number of parameters was 1 in 'QuerySet.last' and is now 2 in overridden 'TemporizableQuerySet.last' method (arguments-differ) ************* Module people.views ultron/people/views.py:47:11: R5102: Instead of HttpResponse(content_type='application/json') use JsonResponse() (http-response-with-content-type-json) ************* Module profiles.views ultron/profiles/views.py:23:11: W0703: Catching too general exception Exception (broad-except) ------------------------------------------------------------------ Your code has been rated at 9.90/10 (previous run: 9.89/10, +0.01) ``` Il y en a certaines pour lesquelles je ne sais rien faire, d'autres où je ne suis pas sûr de l'impact derrière (genre, la méthode `last()` que tu surcharges sur l'un des managers) et certaines pour lesquelles je n'ai pas envie de chercher 😙 - les "catching too general exception". A priori, tu peux merger sans trop de soucis, mais jette quand même un oeil sur ce que j'ai fait, au moins pour comprendre pourquoi je l'ai fait.
Sulley was assigned by Fred 2022-01-07 19:32:27 +01:00
Fred added 4 commits 2022-01-07 19:32:28 +01:00
Owner

J'ai fusionné et fait encore des modifications. J'ai un meilleur score :

(ultron) ➜  Ultron git:(master) ✗ pylint ultron                                                           
************* Module ultron.tools.models
ultron/tools/models.py:63:4: W0221: Number of parameters was 1 in 'QuerySet.last' and is now 2 in overridden 'TemporizableQuerySet.last' method (arguments-differ)
************* Module ultron.core.views
ultron/core/views.py:40:23: W0703: Catching too general exception Exception (broad-except)
************* Module ultron.planning.views
ultron/planning/views.py:83:4: W0702: No exception type(s) specified (bare-except)
ultron/planning/views.py:105:4: W0702: No exception type(s) specified (bare-except)
************* Module ultron.objective.admin
ultron/objective/admin.py:124:5: W0511: TODO: ne proposer QUE les SKILL comme educatif (fixme)
************* Module ultron.objective.views
ultron/objective/views.py:193:4: R1731: Consider using 'level = max(level, level)' instead of unnecessary if block (consider-using-max-builtin)
************* Module ultron.profiles.views
ultron/profiles/views.py:23:11: W0703: Catching too general exception Exception (broad-except)

------------------------------------------------------------------
Your code has been rated at 9.96/10 (previous run: 9.95/10, +0.01)
J'ai fusionné et fait encore des modifications. J'ai un meilleur score : ``` (ultron) ➜ Ultron git:(master) ✗ pylint ultron ************* Module ultron.tools.models ultron/tools/models.py:63:4: W0221: Number of parameters was 1 in 'QuerySet.last' and is now 2 in overridden 'TemporizableQuerySet.last' method (arguments-differ) ************* Module ultron.core.views ultron/core/views.py:40:23: W0703: Catching too general exception Exception (broad-except) ************* Module ultron.planning.views ultron/planning/views.py:83:4: W0702: No exception type(s) specified (bare-except) ultron/planning/views.py:105:4: W0702: No exception type(s) specified (bare-except) ************* Module ultron.objective.admin ultron/objective/admin.py:124:5: W0511: TODO: ne proposer QUE les SKILL comme educatif (fixme) ************* Module ultron.objective.views ultron/objective/views.py:193:4: R1731: Consider using 'level = max(level, level)' instead of unnecessary if block (consider-using-max-builtin) ************* Module ultron.profiles.views ultron/profiles/views.py:23:11: W0703: Catching too general exception Exception (broad-except) ------------------------------------------------------------------ Your code has been rated at 9.96/10 (previous run: 9.95/10, +0.01) ```
Fred closed this pull request 2022-01-08 16:41:31 +01:00
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing

Pull request closed

Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Sulley/Ultron#17
No description provided.