Skip to content

Commit 8ac9f4c

Browse files
zdimensionlajoie42
and
lajoie42
committed
version bump 0.9
Co-Authored-By: lajoie42 <[email protected]>
1 parent 3fd5fd4 commit 8ac9f4c

File tree

14 files changed

+61143
-61131
lines changed

14 files changed

+61143
-61131
lines changed

src/forms/about.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212

1313
class AboutWindow(QDialog):
14-
KONAMI = [Qt.Key_Up, Qt.Key_Up, Qt.Key_Down, Qt.Key_Down, Qt.Key_Left, Qt.Key_Right, Qt.Key_Left, Qt.Key_Right, Qt.Key_B, Qt.Key_A]
14+
KONAMI = [Qt.Key_Up, Qt.Key_Up, Qt.Key_Down, Qt.Key_Down, Qt.Key_Left, Qt.Key_Right, Qt.Key_Left, Qt.Key_Right,
15+
Qt.Key_B, Qt.Key_A]
1516

1617
def __init__(self, parent, version, channel):
1718
super().__init__(parent)

src/forms/mainwindow.py

+24-17
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class GuiState():
8888
"ConvertToPython"
8989
]
9090
filters = {}
91-
lng_actions = {}
91+
lng_actions = {}
9292
item_map = {}
9393
root_item: QTreeWidgetItem = None
9494
mode_zoom: modes.ZoomMode = None
@@ -390,7 +390,8 @@ def python_print(*args, end="\n"):
390390

391391

392392
def update_output():
393-
GuiState.ui.txtOutput.setHtml('<pre style="margin: 0">%s</pre>' % (ExecState.current_output + ExecState.after_output))
393+
GuiState.ui.txtOutput.setHtml(
394+
'<pre style="margin: 0">%s</pre>' % (ExecState.current_output + ExecState.after_output))
394395
GuiState.ui.txtOutput.moveCursor(QTextCursor.End)
395396
GuiState.ui.txtOutput.ensureCursorVisible()
396397
if ExecState.current_output.endswith("\n\n"):
@@ -496,8 +497,10 @@ def plot_window(xmin, xmax, ymin, ymax, xgrad=0, ygrad=0):
496497
GuiState.plot_axes.set_xlim(xmin, xmax)
497498
GuiState.plot_axes.set_ylim(ymin, ymax)
498499

499-
GuiState.plot_axes.get_xaxis().set_major_locator(AutoLocator() if xgrad == 0 else LinearLocator(abs(int((xmax - xmin) / xgrad)) + 1))
500-
GuiState.plot_axes.get_yaxis().set_major_locator(AutoLocator() if ygrad == 0 else LinearLocator(abs(int((ymax - ymin) / ygrad)) + 1))
500+
GuiState.plot_axes.get_xaxis().set_major_locator(
501+
AutoLocator() if xgrad == 0 else LinearLocator(abs(int((xmax - xmin) / xgrad)) + 1))
502+
GuiState.plot_axes.get_yaxis().set_major_locator(
503+
AutoLocator() if ygrad == 0 else LinearLocator(abs(int((ymax - ymin) / ygrad)) + 1))
501504

502505

503506
def plot_point(x, y, color="red"):
@@ -910,7 +913,8 @@ def handler_Save():
910913

911914

912915
def handler_Open():
913-
sel_file, _ = QFileDialog.getOpenFileName(GuiState.window, translate("MainWindow", "Open"), "", ";;".join(GuiState.filters.values()))
916+
sel_file, _ = QFileDialog.getOpenFileName(GuiState.window, translate("MainWindow", "Open"), "",
917+
";;".join(GuiState.filters.values()))
914918

915919
if not sel_file:
916920
return
@@ -1074,7 +1078,7 @@ def clear_output():
10741078

10751079
def print_output():
10761080
print(dir(GuiState.code_editor))
1077-
1081+
10781082
p = QGuiApplication.palette()
10791083
print(p.color(QPalette.Window).name())
10801084
print(p.color(QPalette.WindowText).name())
@@ -1208,14 +1212,16 @@ def load_code_editor():
12081212

12091213
GuiState.mode_ext_select = GuiState.code_editor.modes.append(modes.ExtendedSelectionMode())
12101214

1211-
GuiState.syntax_highlighter = GuiState.code_editor.modes.append(modes.PygmentsSyntaxHighlighter(GuiState.code_editor.document()))
1215+
GuiState.syntax_highlighter = GuiState.code_editor.modes.append(
1216+
modes.PygmentsSyntaxHighlighter(GuiState.code_editor.document()))
12121217
GuiState.syntax_highlighter.fold_detector = api.IndentFoldDetector()
12131218

12141219
GuiState.panel_folding = GuiState.code_editor.panels.append(panels.FoldingPanel())
12151220
GuiState.code_editor.panels.append(panels.LineNumberPanel())
12161221
GuiState.code_editor.modes.append(modes.CheckerMode(pyqode.python.backend.run_pep8))
12171222
GuiState.code_editor.panels.append(panels.GlobalCheckerPanel(), panels.GlobalCheckerPanel.Position.LEFT)
1218-
GuiState.panel_search = GuiState.code_editor.panels.append(panels.SearchAndReplacePanel(), api.Panel.Position.BOTTOM)
1223+
GuiState.panel_search = GuiState.code_editor.panels.append(panels.SearchAndReplacePanel(),
1224+
api.Panel.Position.BOTTOM)
12191225

12201226
GuiState.panel_search._update_label_matches_orig = GuiState.panel_search._update_label_matches
12211227

@@ -1786,8 +1792,8 @@ def str_stmt(stmt):
17861792
ret = translate("Algo", "[k]DECLARE[/k] [c]{var}[/c]").format(var=stmt.variable)
17871793
else:
17881794
ret = (translate("Algo", "[c]{var}[/c] [k]🡨[/k] [c]{value}[/c]")
1789-
if GuiState.ui.actionUseArrowNotation.isChecked()
1790-
else translate("Algo", "[k]VARIABLE[/k] [c]{var}[/c] [k]TAKES VALUE[/k] [c]{value}[/c]")).format(
1795+
if GuiState.ui.actionUseArrowNotation.isChecked()
1796+
else translate("Algo", "[k]VARIABLE[/k] [c]{var}[/c] [k]TAKES VALUE[/k] [c]{value}[/c]")).format(
17911797
var=code(stmt.variable),
17921798
value=code(stmt.value))
17931799

@@ -2023,7 +2029,7 @@ def algo_scroll(event: QWheelEvent):
20232029
handler_ZoomIn()
20242030
elif event.angleDelta().y() < 0:
20252031
handler_ZoomOut()
2026-
2032+
20272033
event.accept()
20282034
else:
20292035
GuiState.ui.treeWidget.wheelEventOrig(event)
@@ -2034,8 +2040,8 @@ def fix_qt_shitty_margins():
20342040
if wgt.text():
20352041
wgt.setText(" " + wgt.text())
20362042
wgt.setMinimumHeight(28)
2037-
2038-
2043+
2044+
20392045
def init_theme_actions():
20402046
def gen(s):
20412047
return lambda: set_theme(s)
@@ -2078,7 +2084,7 @@ def init_ui():
20782084
GuiState.ui.menubar.setCornerWidget(right_corner)
20792085

20802086
init_event_handlers()
2081-
2087+
20822088
init_theme_actions()
20832089

20842090
algo_sel_changed()
@@ -2099,7 +2105,8 @@ def init_ui():
20992105

21002106
center_widget(GuiState.window, None)
21012107
GuiState.window.show()
2102-
2108+
2109+
21032110
def init_event_handlers():
21042111
GuiState.ui.btnSendInput.clicked.connect(send_user_input)
21052112
GuiState.ui.btnClearOutput.clicked.connect(clear_output)
@@ -2140,7 +2147,7 @@ def init_event_handlers():
21402147

21412148
GuiState.ui.treeWidget.itemSelectionChanged.connect(algo_sel_changed)
21422149
GuiState.ui.treeWidget.itemDoubleClicked.connect(algo_double_click)
2143-
2150+
21442151
GuiState.ui.treeWidget.wheelEventOrig = GuiState.ui.treeWidget.wheelEvent
21452152
GuiState.ui.treeWidget.wheelEvent = algo_scroll
21462153

@@ -2157,7 +2164,7 @@ def autosave_write():
21572164
content = repr(AppState.algo)
21582165

21592166
util.settings.setValue("autosave_content", content)
2160-
2167+
21612168

21622169
def autosave_tick():
21632170
if AppState.app_started:

0 commit comments

Comments
 (0)