From 2765093f1da135ceea799ec0f7afc07a833675e5 Mon Sep 17 00:00:00 2001 From: tlaveille Date: Thu, 19 Mar 2026 08:59:07 +0100 Subject: [PATCH] 100% flake8 compatible --- CenRa_AUTOMAP/CenRa_AutoMap.py | 7 +++++-- CenRa_COPIE/CenRa_Copie.py | 6 +++++- CenRa_FLUX/CenRa_Flux.py | 5 ++++- CenRa_METABASE/CenRa_Metabase.py | 8 ++++++-- CenRa_POSTGIS/CenRa_Postgis.py | 9 ++++++--- CenRa_SICEN/sicen.py | 2 +- 6 files changed, 27 insertions(+), 10 deletions(-) diff --git a/CenRa_AUTOMAP/CenRa_AutoMap.py b/CenRa_AUTOMAP/CenRa_AutoMap.py index ab7e2fce..8463d9f1 100644 --- a/CenRa_AUTOMAP/CenRa_AutoMap.py +++ b/CenRa_AUTOMAP/CenRa_AutoMap.py @@ -34,8 +34,11 @@ from .tools.resources import ( ) pyperclip() -from .canvas_editor import AutoMap_Editor -from .style_invoke import AutoMap_Style +try: + from .canvas_editor import AutoMap_Editor + from .style_invoke import AutoMap_Style +except NameError: + print('404') class PgAutoMap: diff --git a/CenRa_COPIE/CenRa_Copie.py b/CenRa_COPIE/CenRa_Copie.py index 86a9e7b4..cb02e0a8 100644 --- a/CenRa_COPIE/CenRa_Copie.py +++ b/CenRa_COPIE/CenRa_Copie.py @@ -21,7 +21,11 @@ from .tools.resources import ( maj_verif, ) pyperclip() -from .copie_editor import Copie_Editor + +try: + from .copie_editor import Copie_Editor +except NameError: + print('404') class PgCopie: diff --git a/CenRa_FLUX/CenRa_Flux.py b/CenRa_FLUX/CenRa_Flux.py index d428d910..028a15ff 100644 --- a/CenRa_FLUX/CenRa_Flux.py +++ b/CenRa_FLUX/CenRa_Flux.py @@ -20,7 +20,10 @@ from .tools.resources import ( ) pyperclip() -from .flux_editor import Flux_Editor +try: + from .flux_editor import Flux_Editor +except NameError: + print('404') class PgFlux: diff --git a/CenRa_METABASE/CenRa_Metabase.py b/CenRa_METABASE/CenRa_Metabase.py index d1e265af..4e6e800f 100644 --- a/CenRa_METABASE/CenRa_Metabase.py +++ b/CenRa_METABASE/CenRa_Metabase.py @@ -31,8 +31,12 @@ from .tools.resources import ( maj_verif, ) pyperclip() -from .dock import CenRa_Metabase -from .editor import Metabase_Editor + +try: + from .dock import CenRa_Metabase + from .editor import Metabase_Editor +except NameError: + print('404') # from CenRa_Metabase.issues import CenRa_Issues diff --git a/CenRa_POSTGIS/CenRa_Postgis.py b/CenRa_POSTGIS/CenRa_Postgis.py index 988baf82..b226a05c 100644 --- a/CenRa_POSTGIS/CenRa_Postgis.py +++ b/CenRa_POSTGIS/CenRa_Postgis.py @@ -25,9 +25,12 @@ from .tools.resources import ( ) pyperclip() -from .postgis_editor import Postgis_Editor -from .postgis_creator import Postgis_Creator -from .postgis_rename import Postgis_Rename +try: + from .postgis_editor import Postgis_Editor + from .postgis_creator import Postgis_Creator + from .postgis_rename import Postgis_Rename +except NameError: + print('404') IPAddr = socket.gethostbyname(socket.gethostname()) diff --git a/CenRa_SICEN/sicen.py b/CenRa_SICEN/sicen.py index 6fd70731..02f395bd 100644 --- a/CenRa_SICEN/sicen.py +++ b/CenRa_SICEN/sicen.py @@ -11,7 +11,7 @@ from qgis.PyQt.QtWidgets import QMenu, QAction, QFileDialog from qgis.PyQt.QtCore import QSettings, QTranslator, QCoreApplication, qVersion # Initialize Qt resources from file resources.py -from . import resources_rc +# from . import resources_rc # Import the code for the dialog from .sicendialog import SICENDialog