diff options
author | Adrian Herrmann <adrian.herrmann@qt.io> | 2023-12-05 13:00:27 +0100 |
---|---|---|
committer | Adrian Herrmann <adrian.herrmann@qt.io> | 2023-12-06 11:52:07 +0100 |
commit | 592c734e57b00040329b49dfbe11869980dff88a (patch) | |
tree | 79fa3498cb974e5026415971ec83107b92b65919 /examples/quickcontrols | |
parent | c0329cff9d7378b8bf6a17baeb97bf5a240977fc (diff) |
Examples: Fix a number of flake8 errors (part 1)
First batch, including low-hanging fruit like Alignments, whitespaces,
line length, indents, etc.
Pick-to: 6.6
Change-Id: I55966876077f7fddfdc82cbe376677af9995f329
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'examples/quickcontrols')
-rw-r--r-- | examples/quickcontrols/contactslist/contactmodel.py | 4 | ||||
-rw-r--r-- | examples/quickcontrols/filesystemexplorer/filesystemexplorer.py | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/examples/quickcontrols/contactslist/contactmodel.py b/examples/quickcontrols/contactslist/contactmodel.py index 313a58305..5d2746c2e 100644 --- a/examples/quickcontrols/contactslist/contactmodel.py +++ b/examples/quickcontrols/contactslist/contactmodel.py @@ -47,7 +47,7 @@ class ContactModel(QAbstractListModel): "Piobesi Torinese", "0399 2826994")) self.m_contacts.append(self.Contact("Harvey Chandler", "North Squaw Creek 11", "Madisonville", "0343 1244492")) - self.m_contacts.append(self.Contact("Miguel Gomez", "Wild Rose Street 13", "Trussville" , + self.m_contacts.append(self.Contact("Miguel Gomez", "Wild Rose Street 13", "Trussville", "0343 9826996")) self.m_contacts.append(self.Contact("Norma Rodriguez", " Glen Eagles Street 53", "Buffalo", "0241 5826596")) @@ -95,7 +95,7 @@ class ContactModel(QAbstractListModel): self.endInsertRows() @Slot(int, str, str, str, str) - def set(self, row: int, full_name: str, address: str, city: str, number: str): + def set(self, row: int, full_name: str, address: str, city: str, number: str): if row < 0 or row >= len(self.m_contacts): return diff --git a/examples/quickcontrols/filesystemexplorer/filesystemexplorer.py b/examples/quickcontrols/filesystemexplorer/filesystemexplorer.py index 90579b360..2bc733c37 100644 --- a/examples/quickcontrols/filesystemexplorer/filesystemexplorer.py +++ b/examples/quickcontrols/filesystemexplorer/filesystemexplorer.py @@ -44,7 +44,8 @@ class FileSystemModel(QFileSystemModel): file = QFile(path) mime = self.db.mimeTypeForFile(QFileInfo(file)) - if 'text' in mime.comment().lower() or any('text' in s.lower() for s in mime.parentMimeTypes()): + if ('text' in mime.comment().lower() + or any('text' in s.lower() for s in mime.parentMimeTypes())): if file.open(QFile.ReadOnly | QFile.Text): stream = QTextStream(file).readAll() return stream |