aboutsummaryrefslogtreecommitdiffstats
path: root/examples/sql
diff options
context:
space:
mode:
authorCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2024-01-25 14:09:56 +0100
committerCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2024-01-25 14:35:15 +0100
commit0555111721a2283a177864538fb437b31b148f63 (patch)
treee7a336310e08b55a4289046fa539088a39ee0fe1 /examples/sql
parentbd0f6c187c560a59884dd1c7640f9352ec457a6c (diff)
examples: fix flake8 issues and add exceptions
Exception for: - qApp and tr not being directly imported: F821 - *rc and qml modules being imported but not used: F401 Pick-to: 6.6 6.5 6.2 Change-Id: I5e40f3f54c1721ef3dc5d7f1e87d5fd8ec771b8e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'examples/sql')
-rw-r--r--examples/sql/books/bookwindow.py8
-rw-r--r--examples/sql/books/main.py2
2 files changed, 5 insertions, 5 deletions
diff --git a/examples/sql/books/bookwindow.py b/examples/sql/books/bookwindow.py
index 0439ce9c7..7f9e0f94b 100644
--- a/examples/sql/books/bookwindow.py
+++ b/examples/sql/books/bookwindow.py
@@ -82,17 +82,17 @@ class BookWindow(QMainWindow, Ui_BookWindow):
def create_menubar(self):
file_menu = self.menuBar().addMenu(self.tr("&File"))
quit_action = file_menu.addAction(self.tr("&Quit"))
- quit_action.triggered.connect(qApp.quit)
+ quit_action.triggered.connect(qApp.quit) # noqa: F821
help_menu = self.menuBar().addMenu(self.tr("&Help"))
about_action = help_menu.addAction(self.tr("&About"))
about_action.setShortcut(QKeySequence.HelpContents)
about_action.triggered.connect(self.about)
aboutQt_action = help_menu.addAction("&About Qt")
- aboutQt_action.triggered.connect(qApp.aboutQt)
+ aboutQt_action.triggered.connect(qApp.aboutQt) # noqa: F821
@Slot()
def about(self):
QMessageBox.about(self, self.tr("About Books"),
- self.tr("<p>The <b>Books</b> example shows how to use Qt SQL classes "
- "with a model/view framework."))
+ self.tr("<p>The <b>Books</b> example shows how to use Qt SQL classes "
+ "with a model/view framework."))
diff --git a/examples/sql/books/main.py b/examples/sql/books/main.py
index 9a6575dc2..025b55884 100644
--- a/examples/sql/books/main.py
+++ b/examples/sql/books/main.py
@@ -4,7 +4,7 @@
import sys
from PySide6.QtWidgets import QApplication
from bookwindow import BookWindow
-import rc_books
+import rc_books # noqa: F401
if __name__ == "__main__":
app = QApplication([])