diff --git a/soitool/codebook_to_pdf.py b/soitool/codebook_to_pdf.py index 4001e9037bd090723ad31a26c811a5192431faaf..73c54ddc9708e9726e4ae1c73c8ed12cc37b89a1 100644 --- a/soitool/codebook_to_pdf.py +++ b/soitool/codebook_to_pdf.py @@ -3,8 +3,13 @@ from datetime import datetime from enum import Enum from reportlab.pdfgen import canvas -from reportlab.platypus import Table, Paragraph, TableStyle, \ - SimpleDocTemplate, Spacer +from reportlab.platypus import ( + Table, + Paragraph, + TableStyle, + SimpleDocTemplate, + Spacer, +) from reportlab.lib.styles import ParagraphStyle from reportlab.lib import colors from reportlab.lib.pagesizes import A4, portrait @@ -12,28 +17,35 @@ from reportlab.lib.units import cm from soitool.database import Database A4_WIDTH = A4[0] -TITLE_FULL = '<u>Kodebok</u>' +TITLE_FULL = "<u>Kodebok</u>" TITLE_SMALL = "<u>Liten Kodebok</u>" HEADERS = ["Ord/Uttrykk", "Kategori", "Type", "Kode"] HEADER_BG_COLOR = colors.HexColor("#a6a6a6") TITLE_STYLE = ParagraphStyle( - name='Title', - fontName='Helvetica', + name="Title", + fontName="Helvetica", fontSize=20, alignment=1, - underlineWidth=1.5 + underlineWidth=1.5, ) PAGE_NUMBER_FONT = "Helvetica" -TABLE_STYLE = TableStyle([ - ('FONTSIZE', (0, 0), (3, 0), 16), # Header-font - ('BOTTOMPADDING', (0, 0), (3, 0), 10), # Header-padding bottom - ("BACKGROUND", (0, 0), (3, 0), HEADER_BG_COLOR), # Header background-color - ("ALIGN", (0, 0), (3, 0), "CENTER"), # Header-text centered - ('GRID', (0, 0), (-1, -1), 1, colors.black), # Border around cells -]) +TABLE_STYLE = TableStyle( + [ + ("FONTSIZE", (0, 0), (3, 0), 16), # Header-font + ("BOTTOMPADDING", (0, 0), (3, 0), 10), # Header-padding bottom + ( + "BACKGROUND", + (0, 0), + (3, 0), + HEADER_BG_COLOR, + ), # Header background-color + ("ALIGN", (0, 0), (3, 0), "CENTER"), # Header-text centered + ("GRID", (0, 0), (-1, -1), 1, colors.black), # Border around cells + ] +) class CodebookSize(Enum): @@ -43,8 +55,9 @@ class CodebookSize(Enum): SMALL = 1 -def generate_codebook_pdf(codebook_size=CodebookSize.FULL, - page_size=A4, orientation=portrait): +def generate_codebook_pdf( + codebook_size=CodebookSize.FULL, page_size=A4, orientation=portrait +): """Generate PDF with data from database-table 'CodeBook'. Parameters @@ -80,8 +93,9 @@ def generate_codebook_pdf(codebook_size=CodebookSize.FULL, file_name = generate_filename(codebook_size) # Create document, add elements and save as PDF - doc = SimpleDocTemplate(file_name, pagesize=orientation(page_size), - topMargin=30) + doc = SimpleDocTemplate( + file_name, pagesize=orientation(page_size), topMargin=30 + ) doc.build(elements, canvasmaker=PageNumCanvas) diff --git a/soitool/database.py b/soitool/database.py index 6e998717b7fce6540b5acc5536f9b2e844156cca..3936aeb9e41bb040d2df160c27db439e5a4aa587 100644 --- a/soitool/database.py +++ b/soitool/database.py @@ -10,17 +10,20 @@ CURDIR = os.path.dirname(__file__) DBPATH = os.path.join(CURDIR, DBNAME) # DDL-statements for creating tables -CODEBOOK = "CREATE TABLE CodeBook" \ - "(Word VARCHAR PRIMARY KEY NOT NULL CHECK(length(Word) > 0), " \ - "Category VARCHAR, " \ - "Type VARCHAR DEFAULT 'Stor' CHECK(Type='Stor' OR Type='Liten'), " \ - "Code VARCHAR UNIQUE)" -CATEGORYWORDS = "CREATE TABLE CategoryWords" \ - "(Word VARCHAR PRIMARY KEY, Category VARCHAR)" +CODEBOOK = ( + "CREATE TABLE CodeBook" + "(Word VARCHAR PRIMARY KEY NOT NULL CHECK(length(Word) > 0), " + "Category VARCHAR, " + "Type VARCHAR DEFAULT 'Stor' CHECK(Type='Stor' OR Type='Liten'), " + "Code VARCHAR UNIQUE)" +) +CATEGORYWORDS = ( + "CREATE TABLE CategoryWords" "(Word VARCHAR PRIMARY KEY, Category VARCHAR)" +) BYHEART = "CREATE TABLE ByHeart(Word VARCHAR PRIMARY KEY)" -class Database(): +class Database: """ Holds database-connection and related functions. diff --git a/soitool/inline_editable_soi_view.py b/soitool/inline_editable_soi_view.py index 1734ca3531d101ea5671d735e00d1a28478b1d05..a1aaea031295cc74b1b8a844859c326419186795 100644 --- a/soitool/inline_editable_soi_view.py +++ b/soitool/inline_editable_soi_view.py @@ -1,7 +1,13 @@ """Includes functionality for inline editing of SOI.""" from PySide2.QtCore import Qt, QRectF, QTimer, QPoint, QMarginsF -from PySide2.QtWidgets import QApplication, QScrollArea, QLabel, \ - QGraphicsScene, QGraphicsView, QGraphicsRectItem +from PySide2.QtWidgets import ( + QApplication, + QScrollArea, + QLabel, + QGraphicsScene, + QGraphicsView, + QGraphicsRectItem, +) from PySide2.QtGui import QFont, QPixmap, QBrush, QPalette, QPainter from PySide2.QtPrintSupport import QPrinter @@ -90,9 +96,11 @@ class InlineEditableSOIView(QScrollArea): ok = painter.begin(printer) if not ok: - raise ValueError("Not able to begin QPainter using QPrinter " - "based on argument " - "filename '{}'".format(filename)) + raise ValueError( + "Not able to begin QPainter using QPrinter " + "based on argument " + "filename '{}'".format(filename) + ) # render each page to own PDF page for i, modules in enumerate(self.pages): @@ -100,9 +108,10 @@ class InlineEditableSOIView(QScrollArea): x = 0 y = self.soi.HEIGHT * i + self.soi.PADDING * i - self.scene.render(painter, source=QRectF(x, y, - self.soi.WIDTH, - self.soi.HEIGHT)) + self.scene.render( + painter, + source=QRectF(x, y, self.soi.WIDTH, self.soi.HEIGHT), + ) # if there are more pages, newPage if i + 1 < len(self.pages): @@ -119,8 +128,9 @@ class InlineEditableSOIView(QScrollArea): # adjust page size full_scene_height = y + self.soi.HEIGHT - self.scene.setSceneRect(QRectF(0, 0, self.soi.WIDTH, - full_scene_height)) + self.scene.setSceneRect( + QRectF(0, 0, self.soi.WIDTH, full_scene_height) + ) self.draw_page(x, y) self.draw_header(x + self.soi.PADDING, y + self.soi.PADDING, i + 1) @@ -150,30 +160,37 @@ class InlineEditableSOIView(QScrollArea): page_number.setFont(QFont("Times New Roman", 50)) # source: https://stackoverflow.com/a/8638114/3545896 # CAUTION: does not work if font is set through stylesheet - label_width = \ + label_width = ( page_number.fontMetrics().boundingRect(page_number.text()).width() + ) page_number.move(x + (self.soi.CONTENT_WIDTH - label_width) / 2, y) self.scene.addWidget(page_number) # classification classification = QLabel(self.soi.classification) - classification.setStyleSheet("background-color: rgba(0,0,0,0%); " - "color: red") + classification.setStyleSheet( + "background-color: rgba(0,0,0,0%); " "color: red" + ) classification.setFont(QFont("Times New Roman", 50)) # source: https://stackoverflow.com/a/8638114/3545896 # CAUTION: does not work if font is set through stylesheet - label_width = (classification.fontMetrics() - .boundingRect(classification.text()).width()) - x_pos = x + self.soi.CONTENT_WIDTH - label_width - \ - self.soi.HEADER_HEIGHT + label_width = ( + classification.fontMetrics() + .boundingRect(classification.text()) + .width() + ) + x_pos = ( + x + self.soi.CONTENT_WIDTH - label_width - self.soi.HEADER_HEIGHT + ) classification.move(x_pos, y) self.scene.addWidget(classification) # patch pixmap = QPixmap(self.soi.icon) patch = QLabel() - patch.setPixmap(pixmap.scaled(self.soi.HEADER_HEIGHT, - self.soi.HEADER_HEIGHT)) + patch.setPixmap( + pixmap.scaled(self.soi.HEADER_HEIGHT, self.soi.HEADER_HEIGHT) + ) patch.move(x + self.soi.CONTENT_WIDTH - self.soi.HEADER_HEIGHT, y) self.scene.addWidget(patch) @@ -186,19 +203,32 @@ class InlineEditableSOIView(QScrollArea): y : int """ # color the page white - page_background = QGraphicsRectItem(x, y, self.soi.WIDTH, - self.soi.HEIGHT) + page_background = QGraphicsRectItem( + x, y, self.soi.WIDTH, self.soi.HEIGHT + ) page_background.setBrush(QBrush(Qt.white)) self.scene.addItem(page_background) # draw borders self.scene.addRect(x, y, self.soi.WIDTH, self.soi.HEIGHT) - self.scene.addRect(x + self.soi.PADDING, y + self.soi.PADDING, - self.soi.CONTENT_WIDTH, self.soi.CONTENT_HEIGHT) - self.scene.addRect(x + self.soi.PADDING, y + self.soi.PADDING, - self.soi.CONTENT_WIDTH, self.soi.CONTENT_HEIGHT) - self.scene.addRect(x + self.soi.PADDING, y + self.soi.PADDING, - self.soi.CONTENT_WIDTH, self.soi.HEADER_HEIGHT) + self.scene.addRect( + x + self.soi.PADDING, + y + self.soi.PADDING, + self.soi.CONTENT_WIDTH, + self.soi.CONTENT_HEIGHT, + ) + self.scene.addRect( + x + self.soi.PADDING, + y + self.soi.PADDING, + self.soi.CONTENT_WIDTH, + self.soi.CONTENT_HEIGHT, + ) + self.scene.addRect( + x + self.soi.PADDING, + y + self.soi.PADDING, + self.soi.CONTENT_WIDTH, + self.soi.HEADER_HEIGHT, + ) def setup_scene(self): """Prepare scene for use. @@ -220,6 +250,7 @@ class InlineEditableSOIView(QScrollArea): Used to demonstrate zooming only, should be removed once the project matures. """ + def do_on_timeout(): self.zoom(1 / 1.00005) @@ -244,8 +275,9 @@ class InlineEditableSOIView(QScrollArea): # Zoom self.view.scale(zoom_factor, zoom_factor) - pos_old = self.view.mapToScene(QPoint(self.soi.WIDTH / 2, - self.soi.HEIGHT / 2)) + pos_old = self.view.mapToScene( + QPoint(self.soi.WIDTH / 2, self.soi.HEIGHT / 2) + ) pos_new = self.view.mapToScene(self.soi.WIDTH / 2, self.soi.HEIGHT / 2) delta = pos_new - pos_old self.view.translate(delta.x(), delta.y()) diff --git a/soitool/main.py b/soitool/main.py index 8b55ed6c5e7869231b39663df1edfb9672e3d2ea..94daab90f293ea5cacd4b379de9638dc2b27bdfb 100644 --- a/soitool/main.py +++ b/soitool/main.py @@ -44,7 +44,7 @@ class CoolWidget(QtWidgets.QWidget): self, "Change text", "Please type something", - QtWidgets.QLineEdit.Normal + QtWidgets.QLineEdit.Normal, ) if ok: self.qlabel.setText(text) diff --git a/soitool/main_window.py b/soitool/main_window.py index 11e6510bd19d0da697811af4abd3c2298fca9c8b..3c731220df321bf8f4c377abedbc4aae928fd99a 100644 --- a/soitool/main_window.py +++ b/soitool/main_window.py @@ -7,8 +7,15 @@ import sys import os from enum import Enum from functools import partial -from PySide2.QtWidgets import QTabWidget, QWidget, QMainWindow, \ - QApplication, QHBoxLayout, QVBoxLayout, QAction +from PySide2.QtWidgets import ( + QTabWidget, + QWidget, + QMainWindow, + QApplication, + QHBoxLayout, + QVBoxLayout, + QAction, +) from PySide2.QtGui import QIcon from soitool.codebook import CodeBookTableView from soitool.codebook_row_adder import CodebookRowAdder @@ -93,15 +100,17 @@ class MainWindow(QMainWindow): # Export full codebook export_codebook_full = QAction("Stor kodebok", self) export_codebook_full.setStatusTip("Eksporter stor kodebok som PDF") - export_codebook_full.triggered.connect(partial(generate_codebook_pdf, - CodebookSize.FULL)) + export_codebook_full.triggered.connect( + partial(generate_codebook_pdf, CodebookSize.FULL) + ) export_codebook.addAction(export_codebook_full) # Export small codebook export_codebook_small = QAction("Liten kodebok", self) export_codebook_small.setStatusTip("Eksporter liten kodebok som PDF") - export_codebook_small.triggered.connect(partial(generate_codebook_pdf, - CodebookSize.SMALL)) + export_codebook_small.triggered.connect( + partial(generate_codebook_pdf, CodebookSize.SMALL) + ) export_codebook.addAction(export_codebook_small) # Hot keys @@ -123,7 +132,7 @@ class MainWindow(QMainWindow): self.setCentralWidget(self.tabs) # Add HV logo - filename = 'media/HVlogo.PNG' + filename = "media/HVlogo.PNG" dirname = os.path.dirname(__file__) filepath = os.path.join(dirname, filename) self.setWindowIcon(QIcon(filepath)) @@ -155,7 +164,7 @@ class MainWindow(QMainWindow): # Set layout, add tab and select tab tab.setLayout(hbox) - self.tabs.addTab(tab, 'Kodebok') + self.tabs.addTab(tab, "Kodebok") self.tabs.setCurrentWidget(tab) diff --git a/soitool/module_list.py b/soitool/module_list.py index d8c81252b5a56cb53f6db3f5cf9337c5c2d27270..bf65f8cb421b972260d59a2c0628ca01fa5e1837 100644 --- a/soitool/module_list.py +++ b/soitool/module_list.py @@ -26,11 +26,14 @@ class ModuleList(QListWidget): super().__init__() # full import path below to avoid circular dependency - if not isinstance(parent, - soitool.soi_workspace_widget.SOIWorkspaceWidget): - raise RuntimeError('Only soitool.SOIWorkspaceWidget is ' - 'acceptable type for parent-variable ' - 'in class Module_list.') + if not isinstance( + parent, soitool.soi_workspace_widget.SOIWorkspaceWidget + ): + raise RuntimeError( + "Only soitool.SOIWorkspaceWidget is " + "acceptable type for parent-variable " + "in class Module_list." + ) self.type = module_type self.parent = parent self.original_element_name = None @@ -56,11 +59,14 @@ class ModuleList(QListWidget): """Fill list with elements.""" # Get names of modules/attachments: if ModuleType(self.type) == ModuleType.MAIN_MODULE: - names = [module["meta"]["name"] for - module in self.parent.soi.modules] + names = [ + module["meta"]["name"] for module in self.parent.soi.modules + ] elif ModuleType(self.type) == ModuleType.ATTACHMENT_MODULE: - names = [attachment["meta"]["name"] for - attachment in self.parent.soi.attachments] + names = [ + attachment["meta"]["name"] + for attachment in self.parent.soi.attachments + ] for i, name in enumerate(names): item = QListWidgetItem(name) diff --git a/soitool/modules/module_table.py b/soitool/modules/module_table.py index 29adbce0881c19645afa7c8e0435eefc6748a197..77808f65a055310e6a299db0d16f067bcd3d4aad 100644 --- a/soitool/modules/module_table.py +++ b/soitool/modules/module_table.py @@ -4,7 +4,7 @@ from PySide2 import QtGui, QtCore from soitool.modules.module_base import ModuleBase HEADER_FONT = QtGui.QFont() -HEADER_FONT.setFamily('Arial') +HEADER_FONT.setFamily("Arial") HEADER_FONT.setPointSize(12) HEADER_FONT.setWeight(100) @@ -78,14 +78,20 @@ class TableModule(ModuleBase, QTableWidget, metaclass=Meta): """ if event.key() == QtCore.Qt.Key_Question: self.add_column() - elif (event.modifiers() == QtCore.Qt.ShiftModifier - and event.key() == QtCore.Qt.Key_Underscore): + elif ( + event.modifiers() == QtCore.Qt.ShiftModifier + and event.key() == QtCore.Qt.Key_Underscore + ): self.remove_column() - elif (event.modifiers() == QtCore.Qt.ControlModifier - and event.key() == QtCore.Qt.Key_Plus): + elif ( + event.modifiers() == QtCore.Qt.ControlModifier + and event.key() == QtCore.Qt.Key_Plus + ): self.add_row() - elif (event.modifiers() == QtCore.Qt.ControlModifier - and event.key() == QtCore.Qt.Key_Underscore): + elif ( + event.modifiers() == QtCore.Qt.ControlModifier + and event.key() == QtCore.Qt.Key_Underscore + ): self.remove_row() else: super(TableModule, self).keyPressEvent(event) diff --git a/soitool/pdf_preview_widget.py b/soitool/pdf_preview_widget.py index f241cb20cb087efdffcf52ae9057a1d99f47d143..a868be31aa5ba3a0bd7c86b5c829188a12b8689c 100644 --- a/soitool/pdf_preview_widget.py +++ b/soitool/pdf_preview_widget.py @@ -24,10 +24,12 @@ class PDFPreviewWidget(QWebEngineView): def __init__(self, initial_url): super().__init__() - self.page().settings().setAttribute(QWebEngineSettings.PluginsEnabled, - True) + self.page().settings().setAttribute( + QWebEngineSettings.PluginsEnabled, True + ) # the following setting is the default, but explicitly enabling to be # explicit - self.page().settings().setAttribute(QWebEngineSettings. - PdfViewerEnabled, True) + self.page().settings().setAttribute( + QWebEngineSettings.PdfViewerEnabled, True + ) self.load(QUrl(initial_url)) diff --git a/soitool/setup_settings.py b/soitool/setup_settings.py index 3fef0c0c7d804eeff898b060f91a7e56ea68fa95..1f23448163ae9224e83db8ac1d9ffbecb4fcd7e4 100644 --- a/soitool/setup_settings.py +++ b/soitool/setup_settings.py @@ -4,8 +4,16 @@ This dialog is called when a button in soi_workspace_widget is pressed """ -from PySide2.QtWidgets import QDialog, QVBoxLayout, QHBoxLayout, QFormLayout, \ - QLabel, QLineEdit, QRadioButton, QPushButton +from PySide2.QtWidgets import ( + QDialog, + QVBoxLayout, + QHBoxLayout, + QFormLayout, + QLabel, + QLineEdit, + QRadioButton, + QPushButton, +) class Setup(QDialog): # pylint: disable = R0902 @@ -34,8 +42,8 @@ class Setup(QDialog): # pylint: disable = R0902 self.layout_setup.addWidget(self.label_header) self.head1 = QLabel("Header1") # Change variablename later self.head2 = QLabel("Header2") # Change variablename later - self.hline1 = QLineEdit() # Change variablename later - self.hline2 = QLineEdit() # Change variablename later + self.hline1 = QLineEdit() # Change variablename later + self.hline2 = QLineEdit() # Change variablename later self.layout_header.addRow(self.head1, self.hline1) self.layout_header.addRow(self.head2, self.hline2) self.layout_setup.addLayout(self.layout_header) @@ -79,3 +87,7 @@ class Setup(QDialog): # pylint: disable = R0902 self.button_cancel.clicked.connect(self.reject) # esc-key (default) self.button_save.clicked.connect(self.accept) # enter-key (default) + + # need two functions, save and cancel + # when cancel, clear lineedits and set radiobuttons to default or SOI-parts + # when save, lineedits writes to labels and find a way to get radiobuttons diff --git a/soitool/soi.py b/soitool/soi.py index 7a4281db04e573965cd4eb7bd8a296fb499fa0c5..4ad77ea0481aa4f83f499bb56eb8acc76bf178fc 100644 --- a/soitool/soi.py +++ b/soitool/soi.py @@ -12,7 +12,7 @@ class ModuleType(Enum): ATTACHMENT_MODULE = 1 -class SOI(): +class SOI: """Datastructure for SOI. Holds all info about an SOI necessary to view and edit it. @@ -72,20 +72,22 @@ class SOI(): # separate data classes (auto-placement stuff in one class, styling in # another, etc). # pylint: disable=r0913 - def __init__(self, - title="Default SOI title", - description="Default SOI description", - version="1", - date=None, - valid_from=None, - valid_to=None, - icon="soitool/media/HVlogo.png", - classification="ugradert", - orientation="landscape", - placement_strategy="auto", - algorithm_bin="BFF", - algorithm_pack="MaxRectsBI", - algorithm_sort="SORT_AREA"): + def __init__( + self, + title="Default SOI title", + description="Default SOI description", + version="1", + date=None, + valid_from=None, + valid_to=None, + icon="soitool/media/HVlogo.png", + classification="ugradert", + orientation="landscape", + placement_strategy="auto", + algorithm_bin="BFF", + algorithm_pack="MaxRectsBI", + algorithm_sort="SORT_AREA", + ): # populate date-related arguments if they are not supplied by the user if date is None: @@ -122,31 +124,16 @@ class SOI(): self.modules = [ { "widget": TableModule(), - "meta": { - "x": 0, - "y": 0, - "page": 1, - "name": 'Tabell1' - } + "meta": {"x": 0, "y": 0, "page": 1, "name": "Tabell1"}, }, { "widget": TableModule(), - "meta": { - "x": 0, - "y": 0, - "page": 1, - "name": 'Tabell2' - } + "meta": {"x": 0, "y": 0, "page": 1, "name": "Tabell2"}, }, { "widget": TableModule(), - "meta": { - "x": 0, - "y": 0, - "page": 2, - "name": 'Tabell3' - } - } + "meta": {"x": 0, "y": 0, "page": 2, "name": "Tabell3"}, + }, ] # NOTE @@ -154,12 +141,7 @@ class SOI(): self.attachments = [ { "widget": TableModule(), - "meta": { - "x": 0, - "y": 0, - "page": 2, - "name": 'Tabell1' - } + "meta": {"x": 0, "y": 0, "page": 2, "name": "Tabell1"}, } ] @@ -177,16 +159,22 @@ class SOI(): itself a dict with fields "x", "y" and "page", and "widget" is a widget based on "ModuleBase" """ - distance_to_start_of_next_soi_content_y = self.CONTENT_HEIGHT + \ - self.PADDING * 2 + self.HEADER_HEIGHT + distance_to_start_of_next_soi_content_y = ( + self.CONTENT_HEIGHT + self.PADDING * 2 + self.HEADER_HEIGHT + ) - scene_skip_distance_page_height = \ - distance_to_start_of_next_soi_content_y * \ - (module["meta"]["page"] - 1) + scene_skip_distance_page_height = ( + distance_to_start_of_next_soi_content_y + * (module["meta"]["page"] - 1) + ) new_x = module["meta"]["x"] + self.PADDING - new_y = module["meta"]["y"] + self.PADDING + self.HEADER_HEIGHT + \ - scene_skip_distance_page_height + new_y = ( + module["meta"]["y"] + + self.PADDING + + self.HEADER_HEIGHT + + scene_skip_distance_page_height + ) module["widget"].set_pos(QPoint(new_x, new_y)) @@ -199,8 +187,9 @@ class SOI(): next to each other from left to right """ x = self.MODULE_PADDING - first_page_modules = [module for module in self.modules - if module["meta"]["page"] == 1] + first_page_modules = [ + module for module in self.modules if module["meta"]["page"] == 1 + ] for module in first_page_modules: module["meta"]["x"] = x @@ -214,8 +203,9 @@ class SOI(): # NOTE the following is simply duplicated.. left like this to KISS # will be replaced by rectpack anyways x = self.MODULE_PADDING - second_page_modules = [module for module in self.modules - if module["meta"]["page"] == 2] + second_page_modules = [ + module for module in self.modules if module["meta"]["page"] == 2 + ] for module in second_page_modules: module["meta"]["x"] = x module["meta"]["y"] = self.MODULE_PADDING diff --git a/soitool/soi_workspace_widget.py b/soitool/soi_workspace_widget.py index 76b5531b35690ce19984de8cdd938edd232b8bb6..c2ea49e1dc3b8edb05fb38cf181269781f2080a6 100644 --- a/soitool/soi_workspace_widget.py +++ b/soitool/soi_workspace_widget.py @@ -3,8 +3,13 @@ Meant for use inside of tabs in our program. """ -from PySide2.QtWidgets import QWidget, QHBoxLayout, QVBoxLayout, QPushButton, \ - QLabel +from PySide2.QtWidgets import ( + QWidget, + QHBoxLayout, + QVBoxLayout, + QPushButton, + QLabel, +) from soitool.soi import SOI, ModuleType from soitool.module_list import ModuleList from soitool.inline_editable_soi_view import InlineEditableSOIView