Skip to content

Commit 3f44eb3

Browse files
committed
Update stable and dev
Update stable and dev * Fix some style make GUI crash
1 parent 4d6da75 commit 3f44eb3

File tree

8 files changed

+43
-130
lines changed

8 files changed

+43
-130
lines changed

dev_requirements.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
frontengine
2-
PySide6==6.7.3
1+
PySide6==6.8.2.1
32
sphinx
43
twine
54
build
6-
je_editor_dev
5+
je_editor_dev
6+
auto-py-to-exe
7+
twine
8+
wheel
9+
build

exe/auto_py_to_exe.json

Lines changed: 5 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
{
99
"optionDest": "filenames",
10-
"value": "C:/CodeWorkspace/je_editor/exe/start_editor.py"
10+
"value": "C:/CodeWorkspace/Python/JEDITOR/exe/start_editor.py"
1111
},
1212
{
1313
"optionDest": "onefile",
@@ -19,16 +19,12 @@
1919
},
2020
{
2121
"optionDest": "icon_file",
22-
"value": "C:/CodeWorkspace/je_editor/exe/je_driver_icon.ico"
22+
"value": "C:/CodeWorkspace/Python/JEDITOR/exe/je_driver_icon.ico"
2323
},
2424
{
2525
"optionDest": "name",
2626
"value": "JEditor"
2727
},
28-
{
29-
"optionDest": "ascii",
30-
"value": false
31-
},
3228
{
3329
"optionDest": "clean_build",
3430
"value": false
@@ -45,10 +41,6 @@
4541
"optionDest": "disable_windowed_traceback",
4642
"value": false
4743
},
48-
{
49-
"optionDest": "embed_manifest",
50-
"value": true
51-
},
5244
{
5345
"optionDest": "uac_admin",
5446
"value": false
@@ -58,88 +50,20 @@
5850
"value": false
5951
},
6052
{
61-
"optionDest": "win_private_assemblies",
62-
"value": false
63-
},
64-
{
65-
"optionDest": "win_no_prefer_redirects",
53+
"optionDest": "argv_emulation",
6654
"value": false
6755
},
6856
{
6957
"optionDest": "bootloader_ignore_signals",
7058
"value": false
7159
},
72-
{
73-
"optionDest": "argv_emulation",
74-
"value": false
75-
},
76-
{
77-
"optionDest": "datas",
78-
"value": "C:/CodeWorkspace/je_editor/exe/je_driver_icon.ico;."
79-
},
8060
{
8161
"optionDest": "datas",
82-
"value": "C:/CodeWorkspace/je_editor/venv/Lib/site-packages/yapf_third_party;yapf_third_party/"
62+
"value": "C:/CodeWorkspace/Python/JEDITOR/exe/je_driver_icon.ico;."
8363
},
8464
{
8565
"optionDest": "pathex",
86-
"value": "C:/CodeWorkspace/je_editor/venv"
87-
},
88-
{
89-
"optionDest": "datas",
90-
"value": "C:/CodeWorkspace/je_editor/exe/venv/Lib/site-packages/jupyter_client;jupyter_client/"
91-
},
92-
{
93-
"optionDest": "datas",
94-
"value": "C:/CodeWorkspace/je_editor/exe/venv/Lib/site-packages/jupyter_client-8.3.1.dist-info;jupyter_client-8.3.1.dist-info/"
95-
},
96-
{
97-
"optionDest": "datas",
98-
"value": "C:/CodeWorkspace/je_editor/exe/venv/Lib/site-packages/jupyter_core-5.3.1.dist-info;jupyter_core-5.3.1.dist-info/"
99-
},
100-
{
101-
"optionDest": "datas",
102-
"value": "C:/CodeWorkspace/je_editor/exe/venv/Lib/site-packages/jupyter_core;jupyter_core/"
103-
},
104-
{
105-
"optionDest": "datas",
106-
"value": "C:/CodeWorkspace/je_editor/exe/venv/Lib/site-packages/qtconsole-5.4.4.dist-info;qtconsole-5.4.4.dist-info/"
107-
},
108-
{
109-
"optionDest": "datas",
110-
"value": "C:/CodeWorkspace/je_editor/exe/venv/Lib/site-packages/qtconsole;qtconsole/"
111-
},
112-
{
113-
"optionDest": "datas",
114-
"value": "C:/CodeWorkspace/je_editor/exe/venv/Lib/site-packages/ipython-8.15.0.dist-info;ipython-8.15.0.dist-info/"
115-
},
116-
{
117-
"optionDest": "datas",
118-
"value": "C:/CodeWorkspace/je_editor/exe/venv/Lib/site-packages/IPython;IPython/"
119-
},
120-
{
121-
"optionDest": "datas",
122-
"value": "C:/CodeWorkspace/je_editor/exe/venv/Lib/site-packages/debugpy/_vendored/pydevd/pydev_ipython;pydev_ipython/"
123-
},
124-
{
125-
"optionDest": "datas",
126-
"value": "C:/CodeWorkspace/je_editor/exe/venv/Lib/site-packages/ipython_genutils-0.2.0.dist-info;ipython_genutils-0.2.0.dist-info/"
127-
},
128-
{
129-
"optionDest": "datas",
130-
"value": "C:/CodeWorkspace/je_editor/exe/venv/Lib/site-packages/ipython_genutils;ipython_genutils/"
131-
},
132-
{
133-
"optionDest": "datas",
134-
"value": "C:/CodeWorkspace/je_editor/exe/venv/Lib/site-packages/debugpy;debugpy/"
135-
},
136-
{
137-
"optionDest": "datas",
138-
"value": "C:/CodeWorkspace/je_editor/venv/Lib/site-packages/parso;parso/"
139-
},
140-
{
141-
"optionDest": "datas",
142-
"value": "C:/CodeWorkspace/je_editor/venv/Lib/site-packages/jedi;jedi/"
66+
"value": "C:/CodeWorkspace/Python/JEDITOR/.venv"
14367
}
14468
],
14569
"nonPyinstallerOptions": {

je_editor/pyside_ui/browser/browser_view.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import pathlib
12
from typing import List
23

34
from PySide6.QtCore import Qt
5+
from PySide6.QtNetwork import QNetworkCookie
46
from PySide6.QtWebEngineCore import QWebEngineDownloadRequest
57
from PySide6.QtWebEngineWidgets import QWebEngineView
68

@@ -18,7 +20,6 @@ def __init__(self, start_url: str = "https://www.google.com/"):
1820
self.download_list: List[QWebEngineDownloadRequest] = list()
1921
self.download_window_list: List[BrowserDownloadWindow] = list()
2022
self.page().profile().downloadRequested.connect(self.download_file)
21-
self.setAttribute(Qt.WidgetAttribute.WA_DeleteOnClose)
2223

2324
def download_file(self, download_instance: QWebEngineDownloadRequest):
2425
jeditor_logger.info("Download File "

je_editor/pyside_ui/code/syntax/python_syntax.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,25 @@ def __init__(self, parent=None, main_window: CodeEditor = None):
2525
current_file_suffix = Path(main_window.current_file).suffix
2626
else:
2727
current_file_suffix = ".py"
28+
# Basic Highlight
29+
for rule_variable_dict in syntax_rule_setting_dict.values():
30+
color = rule_variable_dict.get("color")
31+
text_char_format = QTextCharFormat()
32+
text_char_format.setForeground(color)
33+
for rule in rule_variable_dict.get("rules"):
34+
pattern = QRegularExpression(rule)
35+
self.highlight_rules.append((pattern, text_char_format))
2836
if current_file_suffix == ".py":
29-
# Highlight
37+
# Python Highlight
3038
for rule_variable_dict in syntax_word_setting_dict.values():
3139
color = rule_variable_dict.get("color")
3240
text_char_format = QTextCharFormat()
3341
text_char_format.setForeground(color)
3442
for word in rule_variable_dict.get("words"):
3543
pattern = QRegularExpression(rf"\b{word}\b")
3644
self.highlight_rules.append((pattern, text_char_format))
37-
for rule_variable_dict in syntax_rule_setting_dict.values():
38-
color = rule_variable_dict.get("color")
39-
text_char_format = QTextCharFormat()
40-
text_char_format.setForeground(color)
41-
for rule in rule_variable_dict.get("rules"):
42-
pattern = QRegularExpression(rule)
43-
self.highlight_rules.append((pattern, text_char_format))
4445
else:
46+
# Another Highlight
4547
if syntax_extend_setting_dict.get(current_file_suffix):
4648
for rule_variable_dict in syntax_extend_setting_dict.get(current_file_suffix).values():
4749
color = rule_variable_dict.get("color")

je_editor/pyside_ui/main_ui/menu/style_menu/build_style_menu.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@ def set_style_menu(ui_we_want_to_set: EditorMain) -> None:
1818
ui_we_want_to_set.menu.style_menu = ui_we_want_to_set.menu.addMenu(
1919
language_wrapper.language_word_dict.get("style_menu_label")
2020
)
21-
for style in [
22-
'dark_amber.xml', 'dark_blue.xml', 'dark_cyan.xml', 'dark_lightgreen.xml', 'dark_pink.xml',
23-
'dark_purple.xml', 'dark_red.xml', 'dark_teal.xml', 'dark_yellow.xml', 'light_amber.xml',
24-
'light_blue.xml', 'light_cyan.xml', 'light_cyan_500.xml', 'light_lightgreen.xml',
25-
'light_pink.xml', 'light_purple.xml', 'light_red.xml', 'light_teal.xml', 'light_yellow.xml'
26-
]:
21+
for style in ['dark_amber.xml', 'dark_blue.xml', 'dark_cyan.xml', 'dark_lightgreen.xml',
22+
'dark_pink.xml', 'dark_purple.xml', 'dark_red.xml', 'dark_teal.xml',
23+
'dark_yellow.xml', 'light_amber.xml', 'light_blue.xml', 'light_cyan.xml',
24+
'light_cyan_500.xml', 'light_lightgreen.xml', 'light_pink.xml', 'light_purple.xml'
25+
]:
2726
change_style_action = QAction(style, parent=ui_we_want_to_set.menu.style_menu)
2827
change_style_action.triggered.connect(
2928
lambda checked=False, action=change_style_action: set_style(ui_we_want_to_set, action))

pyproject.toml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
# Rename to build stable version
2-
# This is stable version
1+
# Rename to build dev version
2+
# This is dev version
33
[build-system]
4-
requires = ["setuptools>=61.0"]
4+
requires = ["setuptools"]
55
build-backend = "setuptools.build_meta"
66

77
[project]
8-
name = "je_editor"
9-
version = "0.0.194"
8+
name = "je_editor_dev"
9+
version = "0.0.217"
1010
authors = [
1111
{ name = "JE-Chen", email = "[email protected]" },
1212
]
1313
description = "JEditor is basic but powerful editor include GPT"
1414
requires-python = ">=3.9"
1515
license = { text = "MIT" }
1616
dependencies = [
17-
"PySide6==6.7.3", "qt-material", "yapf", "frontengine", "pycodestyle", "jedi", "qtconsole", "re-edge-gpt[gui]"
17+
"PySide6==6.8.2.1", "qt-material", "yapf", "frontengine", "pycodestyle", "jedi", "qtconsole"
1818
]
1919
classifiers = [
2020
"Programming Language :: Python :: 3.9",
@@ -26,7 +26,6 @@ classifiers = [
2626
"Operating System :: OS Independent"
2727
]
2828

29-
3029
[project.urls]
3130
Homepage = "https://github.com/JE-Chen/je_editor"
3231
Documentation = "https://je-editor.readthedocs.io/en/latest/"

requirements.txt

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
frontengine
2-
PySide6==6.7.3
1+
PySide6==6.8.2.1
32
sphinx
4-
auto-py-to-exe
5-
twine
6-
yapf
7-
pycodestyle
8-
jedi
9-
attrs
10-
wheel
11-
build
12-
setuptools
13-
pyinstaller
14-
requests
15-
gevent
16-
je_editor
17-
Ipython
18-
ipykernel
19-
qtconsole
3+
auto-py-to-exe

dev.toml renamed to stable.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
# Rename to build dev version
2-
# This is dev version
1+
# Rename to build stable version
2+
# This is stable version
33
[build-system]
4-
requires = ["setuptools"]
4+
requires = ["setuptools>=61.0"]
55
build-backend = "setuptools.build_meta"
66

77
[project]
8-
name = "je_editor_dev"
9-
version = "0.0.214"
8+
name = "je_editor"
9+
version = "0.0.197"
1010
authors = [
1111
{ name = "JE-Chen", email = "[email protected]" },
1212
]
1313
description = "JEditor is basic but powerful editor include GPT"
1414
requires-python = ">=3.9"
1515
license = { text = "MIT" }
1616
dependencies = [
17-
"PySide6==6.7.3", "qt-material", "yapf", "frontengine", "pycodestyle", "jedi", "qtconsole", "re-edge-gpt[gui]"
17+
"PySide6==6.8.2.1", "qt-material", "yapf", "frontengine", "pycodestyle", "jedi", "qtconsole", "re-edge-gpt[gui]"
1818
]
1919
classifiers = [
2020
"Programming Language :: Python :: 3.9",
@@ -26,6 +26,7 @@ classifiers = [
2626
"Operating System :: OS Independent"
2727
]
2828

29+
2930
[project.urls]
3031
Homepage = "https://github.com/JE-Chen/je_editor"
3132
Documentation = "https://je-editor.readthedocs.io/en/latest/"

0 commit comments

Comments
 (0)