Project

General

Profile

Bug #74060

erreurs pylint W0719(broad-exception-raised) et R1735(use-dict-literal)

Added by Thomas Noël 4 months ago. Updated 4 months ago.

Status:
Fermé
Priority:
Normal
Assignee:
Target version:
-
Start date:
01 February 2023
Due date:
% Done:

0%

Estimated time:
Patch proposed:
No
Planning:
No

Description

Cf ci-dessous le nouveau pylint.

J'imagine qu'on peut :
  • considérer que W0719 ne nous dérange pas
  • adapter notre code pour ne plus avoir les R1735
************* Module passerelle.apps.clicrdv.models
passerelle/apps/clicrdv/models.py:136: [W0719(broad-exception-raised), ClicRdv.get_times] Raising too general exception: Exception
************* Module passerelle.apps.base_adresse.models
passerelle/apps/base_adresse/models.py:427: [W0719(broad-exception-raised), BaseAdresse.check_status] Raising too general exception: Exception
passerelle/apps/base_adresse/models.py:503: [W0719(broad-exception-raised), BaseAdresse.update_streets_data] Raising too general exception: Exception
passerelle/apps/base_adresse/models.py:527: [W0719(broad-exception-raised), BaseAdresse.get_api_geo_endpoint] Raising too general exception: Exception
************* Module passerelle.apps.soap.models
passerelle/apps/soap/models.py:151: [R1735(use-dict-literal), SOAPConnector.get_endpoints_infos] Consider using '{"name": 'method', "pattern": f'{name}/', "example_pattern": f'{name}/', ... }' instead of a call to 'dict'.
************* Module passerelle.apps.feeds.models
passerelle/apps/feeds/models.py:45: [W0719(broad-exception-raised), Feed.check_status] Raising too general exception: Exception
************* Module passerelle.apps.arpege_ecp.models
passerelle/apps/arpege_ecp/models.py:49: [W0719(broad-exception-raised), ArpegeECP.check_status] Raising too general exception: Exception
passerelle/apps/arpege_ecp/models.py:51: [W0719(broad-exception-raised), ArpegeECP.check_status] Raising too general exception: Exception
************* Module passerelle.contrib.toulouse_smart.models
passerelle/contrib/toulouse_smart/models.py:280: [W0719(broad-exception-raised), ToulouseSmartResource.create_intervention_job] Raising too general exception: Exception
passerelle/contrib/toulouse_smart/models.py:321: [W0719(broad-exception-raised), ToulouseSmartResource.add_media_job] Raising too general exception: Exception
************* Module passerelle.contrib.greco.models
passerelle/contrib/greco/models.py:220: [W0719(broad-exception-raised), Greco.check_status] Raising too general exception: Exception
************* Module passerelle.contrib.tcl.models
passerelle/contrib/tcl/models.py:263: [W0719(broad-exception-raised), Line.save] Raising too general exception: Exception
************* Module passerelle.base.models
passerelle/base/models.py:208: [R1735(use-dict-literal), BaseResource.make_requests] Consider using '{"resource": self, "logger": self.logger}' instead of a call to 'dict'.
passerelle/base/models.py:389: [W0719(broad-exception-raised), BaseResource.export_json] Raising too general exception: Exception
passerelle/base/models.py:467: [W0719(broad-exception-raised), BaseResource.import_json_real] Raising too general exception: Exception
************* Module passerelle.utils
passerelle/utils/__init__.py:168: [W0719(broad-exception-raised), protected_api.decorator._wrapped_view] Raising too general exception: Exception
************* Module tests.test_dpark
tests/test_dpark.py:91: [W0719(broad-exception-raised), MockedService.raise_error] Raising too general exception: Exception
************* Module tests.test_actesweb
tests/test_actesweb.py:75: [R1735(use-dict-literal), test_demand_creation] Consider using '{"DEMANDEUR_CIVILITE": 'Madame', "DEMANDEUR_NOM_USAGE": "W'hatever?", ... }' instead of a call to 'dict'.
tests/test_actesweb.py:105: [R1735(use-dict-literal), test_demand_creation] Consider using '{"DEMANDEUR_CIVILITE": 'Madame', "DEMANDEUR_NOM_USAGE": 'Whatever', ... }' instead of a call to 'dict'.
tests/test_actesweb.py:149: [R1735(use-dict-literal), test_demand_creation] Consider using '{"DEMANDEUR_CIVILITE": 'Madame', "DEMANDEUR_NOM_USAGE": 'Whatever', ... }' instead of a call to 'dict'.
************* Module tests.test_generic_endpoint
tests/test_generic_endpoint.py:900: [W0719(broad-exception-raised), DummyConnectorWithCheckStatusFailure.check_status] Raising too general exception: Exception
************* Module tests.test_cmis
tests/test_cmis.py:376: [W0719(broad-exception-raised), test_get_or_create_folder_with_some_existing_and_some_not.getObjectByPath] Raising too general exception: Exception
************* Module tests.test_cartads_cs
tests/test_cartads_cs.py:724: [W0719(broad-exception-raised), test_role_sync.idp_mock] Raising too general exception: Exception
************* Module tests.test_utils_files
tests/test_utils_files.py:32: [W0719(broad-exception-raised), test_atomic_write] Raising too general exception: Exception

Associated revisions

Revision 791eedd3 (diff)
Added by Thomas Noël 4 months ago

misc: fix new pylint 2.16 warnings (#74060)

History

#1

Updated by Thomas Noël 4 months ago

Aussi, en local (python 3.11) j'ai en plus :

************* Module tests.test_toulouse_smart
tests/test_toulouse_smart.py:18: [W4901(deprecated-module), ] Deprecated module 'cgi'
************* Module tests.test_astre_rest
tests/test_astre_rest.py:2: [W4901(deprecated-module), ] Deprecated module 'cgi'

(mais sans doute qu'on peut s'en fiche pour l'instant)

#2

Updated by Thomas Noël 4 months ago

  • Assignee set to Thomas Noël
#3

Updated by Robot Gitea 4 months ago

  • Status changed from Nouveau to Solution proposée

Thomas NOEL (tnoel) a ouvert une pull request sur Gitea concernant cette demande :

#4

Updated by Robot Gitea 4 months ago

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

Nicolas Roche (nroche) a approuvé une pull request sur Gitea concernant cette demande :

#5

Updated by Thomas Noël 4 months ago

  • Status changed from Solution validée to Résolu (à déployer)
commit 791eedd3f550f5532dc68ba24b5a19572773e2aa
Author: Thomas NOËL <tnoel@entrouvert.com>
Date:   Wed Feb 1 13:55:49 2023 +0100

    misc: fix new pylint 2.16 warnings (#74060)

#6

Updated by Transition automatique 4 months ago

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

Updated by Transition automatique about 2 months ago

Automatic expiration

Also available in: Atom PDF