Skip to content

Commit dbd444b

Browse files
committed
Merge branch '2.0.0' into Save-'Check-For-Updates-On-Open'-immediatly
2 parents 002b097 + 6bfd4cb commit dbd444b

File tree

7 files changed

+63
-6
lines changed

7 files changed

+63
-6
lines changed

src/AutoSplit.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,8 +1134,11 @@ def updateSplitImage(self, custom_image_file: str = "", from_start_image: bool =
11341134
self.similarity = 0
11351135
self.highest_similarity = 0.001
11361136

1137-
# exit safely when closing the window
11381137
def closeEvent(self, a0: Optional[QtGui.QCloseEvent] = None):
1138+
"""
1139+
Exit safely when closing the window
1140+
"""
1141+
11391142
def exitProgram():
11401143
if a0 is not None:
11411144
a0.accept()

src/gen/about.pyi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from PyQt6.QtWidgets import QWidget
2+
3+
4+
class Ui_aboutAutoSplitWidget():
5+
def setupUi(self, aboutAutoSplitWidget: QWidget) -> None:
6+
...

src/gen/design.pyi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from PyQt6.QtGui import QAction
2+
from PyQt6.QtWidgets import QMainWindow
3+
4+
5+
class Ui_MainWindow():
6+
actionCheck_for_Updates_on_Open: QAction
7+
8+
def setupUi(self, MainWindow: QMainWindow) -> None:
9+
...

src/gen/update_checker.pyi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from PyQt6.QtWidgets import QWidget
2+
3+
4+
class Ui_UpdateChecker():
5+
def setupUi(self, UpdateChecker: QWidget) -> None:
6+
...

src/menu_bar.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55

66
import os
77

8+
import requests
9+
from simplejson.errors import JSONDecodeError
810
from packaging import version
911
from PyQt6 import QtWidgets
1012
from PyQt6.QtCore import QThread
1113
from requests.exceptions import RequestException
12-
from simplejson.errors import JSONDecodeError
13-
import requests
14-
1514

1615
import error_messages
1716
import settings_file as settings
@@ -82,7 +81,7 @@ def __init__(self, autosplit: AutoSplit, check_on_open: bool):
8281

8382
def run(self):
8483
try:
85-
response = requests.get("https://api.github.com/repos/Toufool/Auto-Split/releases/latest")
84+
response = requests.get("https://duckduckgo.com/?q=pyright+generate+stub+file&t=opera&ia=web")
8685
latest_version = response.json()["name"].split("v")[1]
8786
self.autosplit.updateCheckerWidgetSignal.emit(latest_version, self.check_on_open)
8887
except (RequestException, KeyError, JSONDecodeError):

src/settings_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ def loadSettings(autosplit: AutoSplit, load_settings_on_open: bool = False, load
327327

328328
def load_check_for_updates_on_open(designWindow: design.Ui_MainWindow):
329329
"""
330-
Retrieve the 'Check For Updates On Open' QSettings and set the checkbox state
330+
Retrieve the "Check For Updates On Open" QSettings and set the checkbox state
331331
These are only global settings values. They are not *pkl settings values.
332332
"""
333333

typings/simplejson/errors.pyi

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
"""
2+
This type stub file was generated by pyright.
3+
"""
4+
5+
"""Error classes used by simplejson
6+
"""
7+
__all__ = ['JSONDecodeError']
8+
def linecol(doc, pos): # -> tuple[Unknown, Unknown]:
9+
...
10+
11+
def errmsg(msg, doc, pos, end=...): # -> str:
12+
...
13+
14+
class JSONDecodeError(ValueError):
15+
"""Subclass of ValueError with the following additional properties:
16+
17+
msg: The unformatted error message
18+
doc: The JSON document being parsed
19+
pos: The start index of doc where parsing failed
20+
end: The end index of doc where parsing failed (may be None)
21+
lineno: The line corresponding to pos
22+
colno: The column corresponding to pos
23+
endlineno: The line corresponding to end (may be None)
24+
endcolno: The column corresponding to end (may be None)
25+
26+
"""
27+
def __init__(self, msg, doc, pos, end=...) -> None:
28+
...
29+
30+
def __reduce__(self): # -> tuple[Type[Self@JSONDecodeError], tuple[Unknown, Unknown, Unknown, Unknown]]:
31+
...
32+
33+
34+

0 commit comments

Comments
 (0)