flake8 sicen

This commit is contained in:
Tom LAVEILLE 2025-07-29 15:16:03 +02:00
parent e503423e49
commit ca1d895eb1
5 changed files with 336 additions and 359 deletions

View File

@ -1,9 +1,9 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
/*************************************************************************** /***************************************************************************
SICEN SICEN
A QGIS plugin A QGIS plugin
Filtre sur données SICEN Filtre sur données SICEN
------------------- -------------------
begin : 2014-10-17 begin : 2014-10-17
copyright : (C) 2014 by Guillaume COSTES copyright : (C) 2014 by Guillaume COSTES
@ -18,10 +18,11 @@
* (at your option) any later version. * * (at your option) any later version. *
* * * *
***************************************************************************/ ***************************************************************************/
This script initializes the plugin, making it known to QGIS. This script initializes the plugin, making it known to QGIS.
""" """
from __future__ import absolute_import from __future__ import absolute_import
def classFactory(iface): def classFactory(iface):
# load SICEN class from file SICEN # load SICEN class from file SICEN
from .sicen import SICEN from .sicen import SICEN

View File

@ -5,10 +5,9 @@
# Created by: The Resource Compiler for PyQt5 (Qt v5.15.2) # Created by: The Resource Compiler for PyQt5 (Qt v5.15.2)
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
try:
from PyQt5 import QtCore from qgis.PyQt import QtCore
except:
from PyQt6 import QtCore
qt_resource_data = b"\ qt_resource_data = b"\
\x00\x00\x0d\x89\ \x00\x00\x0d\x89\
\x89\ \x89\
@ -558,10 +557,13 @@ else:
rcc_version = 2 rcc_version = 2
qt_resource_struct = qt_resource_struct_v2 qt_resource_struct = qt_resource_struct_v2
def qInitResources(): def qInitResources():
QtCore.qRegisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data) QtCore.qRegisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data)
def qCleanupResources(): def qCleanupResources():
QtCore.qUnregisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data) QtCore.qUnregisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data)
qInitResources() qInitResources()

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,9 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
/*************************************************************************** /***************************************************************************
SICENDialog SICENDialog
A QGIS plugin A QGIS plugin
Filtre sur données SICEN Filtre sur données SICEN
------------------- -------------------
begin : 2014-10-17 begin : 2014-10-17
copyright : (C) 2014 by Guillaume COSTES copyright : (C) 2014 by Guillaume COSTES
@ -20,8 +20,8 @@
***************************************************************************/ ***************************************************************************/
""" """
from qgis.PyQt import QtCore, QtGui # from qgis.PyQt import QtCore, QtGui
from qgis.PyQt.QtWidgets import QAction, QDialog from qgis.PyQt.QtWidgets import QDialog
from .ui_sicen import Ui_SICEN from .ui_sicen import Ui_SICEN
# create the dialog for zoom to point # create the dialog for zoom to point

View File

@ -8,9 +8,10 @@
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
from builtins import object from builtins import object
from qgis.PyQt import QtCore, QtGui from qgis.PyQt import QtCore
from qgis.PyQt.QtGui import QFont from qgis.PyQt.QtGui import QFont
from qgis.PyQt.QtWidgets import QAction, QDialog, QDialogButtonBox, QLabel, QApplication, QTabWidget, QWidget, QGroupBox, QGridLayout, QComboBox, QCheckBox, QCalendarWidget, QToolBox, QFrame, QLineEdit, QSizePolicy #Modifié # Modifié
from qgis.PyQt.QtWidgets import QDialogButtonBox, QLabel, QApplication, QTabWidget, QWidget, QGroupBox, QGridLayout, QComboBox, QCheckBox, QCalendarWidget, QToolBox, QFrame, QLineEdit, QSizePolicy
try: try:
@ -21,20 +22,22 @@ except AttributeError:
try: try:
_encoding = QApplication.UnicodeUTF8 _encoding = QApplication.UnicodeUTF8
def _translate(context, text, disambig): def _translate(context, text, disambig):
return QApplication.translate(context, text, disambig, _encoding) return QApplication.translate(context, text, disambig, _encoding)
except AttributeError: except AttributeError:
def _translate(context, text, disambig): def _translate(context, text, disambig):
return QApplication.translate(context, text, disambig) return QApplication.translate(context, text, disambig)
class Ui_SICEN(object): class Ui_SICEN(object):
def setupUi(self, SICEN): def setupUi(self, SICEN):
SICEN.setObjectName(_fromUtf8("SICEN")) SICEN.setObjectName(_fromUtf8("SICEN"))
SICEN.resize(592, 556) SICEN.resize(592, 556)
self.buttonBox = QDialogButtonBox(SICEN) self.buttonBox = QDialogButtonBox(SICEN)
self.buttonBox.setGeometry(QtCore.QRect(390, 520, 161, 32)) self.buttonBox.setGeometry(QtCore.QRect(390, 520, 161, 32))
#self.buttonBox.setOrientation(QtCore.Qt.Horizontal) # self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QDialogButtonBox.StandardButton(0x00400000)|QDialogButtonBox.StandardButton(0x00000400)) self.buttonBox.setStandardButtons(QDialogButtonBox.StandardButton(0x00400000) | QDialogButtonBox.StandardButton(0x00000400))
self.buttonBox.setObjectName(_fromUtf8("buttonBox")) self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
self.Titre = QLabel(SICEN) self.Titre = QLabel(SICEN)
self.Titre.setGeometry(QtCore.QRect(110, 10, 331, 31)) self.Titre.setGeometry(QtCore.QRect(110, 10, 331, 31))
@ -529,7 +532,7 @@ class Ui_SICEN(object):
font.setBold(True) font.setBold(True)
font.setWeight(75) font.setWeight(75)
self.groupBox_6.setFont(font) self.groupBox_6.setFont(font)
self.groupBox_6.setAlignment(QtCore.Qt.AlignmentFlag(0x0001)|QtCore.Qt.AlignmentFlag(0x0001)|QtCore.Qt.AlignmentFlag(0x0080)) self.groupBox_6.setAlignment(QtCore.Qt.AlignmentFlag(0x0001) | QtCore.Qt.AlignmentFlag(0x0001) | QtCore.Qt.AlignmentFlag(0x0080))
self.groupBox_6.setObjectName(_fromUtf8("groupBox_6")) self.groupBox_6.setObjectName(_fromUtf8("groupBox_6"))
self.gridLayoutWidget_7 = QWidget(self.groupBox_6) self.gridLayoutWidget_7 = QWidget(self.groupBox_6)
self.gridLayoutWidget_7.setGeometry(QtCore.QRect(10, 20, 491, 21)) self.gridLayoutWidget_7.setGeometry(QtCore.QRect(10, 20, 491, 21))
@ -681,7 +684,8 @@ class Ui_SICEN(object):
self.Emprise.setCurrentIndex(0) self.Emprise.setCurrentIndex(0)
self.protections.setCurrentIndex(0) self.protections.setCurrentIndex(0)
self.buttonBox.accepted.connect(SICEN.accept) self.buttonBox.accepted.connect(SICEN.accept)
self.buttonBox.rejected.connect(SICEN.reject) #Modifié # Modifié
self.buttonBox.rejected.connect(SICEN.reject)
QtCore.QMetaObject.connectSlotsByName(SICEN) QtCore.QMetaObject.connectSlotsByName(SICEN)
def retranslateUi(self, SICEN): def retranslateUi(self, SICEN):
@ -753,4 +757,3 @@ class Ui_SICEN(object):
self.label_11.setText(_translate("SICEN", "4.", None)) self.label_11.setText(_translate("SICEN", "4.", None))
self.Emprise.setTabText(self.Emprise.indexOf(self.tab_4), _translate("SICEN", "Filtre par Emprise", None)) self.Emprise.setTabText(self.Emprise.indexOf(self.tab_4), _translate("SICEN", "Filtre par Emprise", None))
self.centroide.setText(_translate("SICEN", "Utiliser les centroïdes pour les observations autres que ponctuelles", None)) self.centroide.setText(_translate("SICEN", "Utiliser les centroïdes pour les observations autres que ponctuelles", None))