diff --git a/setup.py b/setup.py index a32cd79..d9146e8 100644 --- a/setup.py +++ b/setup.py @@ -4,9 +4,9 @@ from src.version import version install_requires = [ "requests==2.26.0", - "pyside2==5.15.2", + "PySide6==6.2.0", "toml==0.10.2", - "pillow==8.3.1", + "pillow==8.3.2", "pyaoaddons==0.2.7.dev" ] diff --git a/src/environment.py b/src/environment.py index e615a12..e046fa4 100644 --- a/src/environment.py +++ b/src/environment.py @@ -19,7 +19,6 @@ if TEST_ENV_ENABLED: test_type = os.getenv('TESTING') if test_type not in _test_types: - raise Exception('Unavailable GUI test type, avaliable values: {}'.format( - ','.join(_test_types.keys()))) + raise Exception(f'Unavailable GUI test type: {test_type}, avaliable values: {",".join(_test_types.keys())}') TEST_TYPE = _test_types[test_type.lower()] diff --git a/src/gui/app.py b/src/gui/app.py index 752b86c..1087cf2 100644 --- a/src/gui/app.py +++ b/src/gui/app.py @@ -3,12 +3,12 @@ import platform import sys import requests -from PySide2 import QtCore # type: ignore -from PySide2.QtCore import Qt # type: ignore -from PySide2 import QtGui # type: ignore -from PySide2.QtWidgets import QApplication # type: ignore -from PySide2.QtWidgets import QMessageBox # type: ignore -from PySide2.QtWidgets import QPushButton # type: ignore +from PySide6 import QtCore # type: ignore +from PySide6.QtCore import Qt # type: ignore +from PySide6 import QtGui # type: ignore +from PySide6.QtWidgets import QApplication # type: ignore +from PySide6.QtWidgets import QMessageBox # type: ignore +from PySide6.QtWidgets import QPushButton # type: ignore from ..engine import InitializationResult from ..engine import initialize diff --git a/src/gui/modules/about.py b/src/gui/modules/about.py index 2b08e6e..25df2de 100644 --- a/src/gui/modules/about.py +++ b/src/gui/modules/about.py @@ -1,4 +1,4 @@ -from PySide2.QtWidgets import QMessageBox # noqa type: ignore +from PySide6.QtWidgets import QMessageBox # noqa type: ignore from ...utils.version import get_version diff --git a/src/gui/modules/main.py b/src/gui/modules/main.py index 1a04161..0c06d92 100644 --- a/src/gui/modules/main.py +++ b/src/gui/modules/main.py @@ -1,14 +1,14 @@ import sys import functools -from PySide2 import QtGui # type: ignore -from PySide2.QtCore import Qt # type: ignore -from PySide2.QtCore import QTimer # type: ignore -from PySide2.QtWidgets import QComboBox # type: ignore -from PySide2.QtWidgets import QHBoxLayout # type: ignore -from PySide2.QtWidgets import QPushButton # type: ignore -from PySide2.QtWidgets import QVBoxLayout # type: ignore -from PySide2.QtWidgets import QWidget # type: ignore +from PySide6 import QtGui # type: ignore +from PySide6.QtCore import Qt # type: ignore +from PySide6.QtCore import QTimer # type: ignore +from PySide6.QtWidgets import QComboBox # type: ignore +from PySide6.QtWidgets import QHBoxLayout # type: ignore +from PySide6.QtWidgets import QPushButton # type: ignore +from PySide6.QtWidgets import QVBoxLayout # type: ignore +from PySide6.QtWidgets import QWidget # type: ignore from ... import engine @@ -62,7 +62,7 @@ class TopBar(QWidget): self.view_type = ViewTypeWidget() self.layout = QHBoxLayout() self.layout.setSpacing(0) - self.layout.setMargin(0) + self.layout.setContentsMargins(0, 0, 0, 0) self.layout.addWidget(self.view_type) self.about_button = AboutButton() diff --git a/src/gui/modules/views/copy_button.py b/src/gui/modules/views/copy_button.py index 36055e5..3ae7b8a 100644 --- a/src/gui/modules/views/copy_button.py +++ b/src/gui/modules/views/copy_button.py @@ -1,6 +1,6 @@ -from PySide2.QtWidgets import QPushButton # type: ignore -from PySide2 import QtGui # type: ignore +from PySide6.QtWidgets import QPushButton # type: ignore +from PySide6 import QtGui # type: ignore from ....utils import assets from ....stats.list_item import PlayerListItem diff --git a/src/gui/modules/views/list_view/icon.py b/src/gui/modules/views/list_view/icon.py index cb6e989..10b2260 100644 --- a/src/gui/modules/views/list_view/icon.py +++ b/src/gui/modules/views/list_view/icon.py @@ -1,6 +1,6 @@ from io import BytesIO from PIL import Image, ImageQt # type: ignore -from PySide2 import QtGui # type: ignore +from PySide6 import QtGui # type: ignore from .....utils import async_request diff --git a/src/gui/modules/views/list_view/list.py b/src/gui/modules/views/list_view/list.py index 86fd878..1afdedc 100644 --- a/src/gui/modules/views/list_view/list.py +++ b/src/gui/modules/views/list_view/list.py @@ -3,20 +3,20 @@ import functools import re from typing import List -from PySide2 import QtCore # type: ignore -from PySide2 import QtGui # type: ignore -from PySide2.QtCore import Qt # type: ignore -from PySide2.QtGui import QStandardItem # type: ignore -from PySide2.QtGui import QStandardItemModel # type: ignore -from PySide2.QtWidgets import QApplication # type: ignore -from PySide2.QtWidgets import QComboBox # type: ignore -from PySide2.QtWidgets import QHBoxLayout # type: ignore -from PySide2.QtWidgets import QLabel # type: ignore -from PySide2.QtWidgets import QListView # type: ignore -from PySide2.QtWidgets import QMessageBox # type: ignore -from PySide2.QtWidgets import QProgressBar # type: ignore -from PySide2.QtWidgets import QPushButton # type: ignore -from PySide2.QtWidgets import QVBoxLayout # type: ignore +from PySide6 import QtCore # type: ignore +from PySide6 import QtGui # type: ignore +from PySide6.QtCore import Qt # type: ignore +from PySide6.QtGui import QStandardItem # type: ignore +from PySide6.QtGui import QStandardItemModel # type: ignore +from PySide6.QtWidgets import QApplication # type: ignore +from PySide6.QtWidgets import QComboBox # type: ignore +from PySide6.QtWidgets import QHBoxLayout # type: ignore +from PySide6.QtWidgets import QLabel # type: ignore +from PySide6.QtWidgets import QListView # type: ignore +from PySide6.QtWidgets import QMessageBox # type: ignore +from PySide6.QtWidgets import QProgressBar # type: ignore +from PySide6.QtWidgets import QPushButton # type: ignore +from PySide6.QtWidgets import QVBoxLayout # type: ignore from .....stats.list_item import PlayerListItem from .....utils import assets diff --git a/src/gui/modules/views/mode_based_list_view.py b/src/gui/modules/views/mode_based_list_view.py index 3426c24..846ef41 100644 --- a/src/gui/modules/views/mode_based_list_view.py +++ b/src/gui/modules/views/mode_based_list_view.py @@ -1,12 +1,12 @@ -# from PySide2.QtCore import QTimer -# from PySide2.QtCore import Qt +# from PySide6.QtCore import QTimer +# from PySide6.QtCore import Qt from typing import Callable -from PySide2.QtWidgets import QHBoxLayout # type: ignore -from PySide2.QtWidgets import QVBoxLayout # type: ignore -from PySide2.QtWidgets import QComboBox # type: ignore -from PySide2.QtWidgets import QWidget # type: ignore +from PySide6.QtWidgets import QHBoxLayout # type: ignore +from PySide6.QtWidgets import QVBoxLayout # type: ignore +from PySide6.QtWidgets import QComboBox # type: ignore +from PySide6.QtWidgets import QWidget # type: ignore from ....stats.list_item import PlayerListItem @@ -56,7 +56,7 @@ class ModeBasedListView(QWidget): QWidget.__init__(self) self.layout = QVBoxLayout() self.layout.setSpacing(0) - self.layout.setMargin(0) + self.layout.setContentsMargins(0, 0, 0, 0) self.session_bar = SessionBar(clipboard) self.layout.addWidget(self.session_bar) diff --git a/src/gui/modules/views/player_stats.py b/src/gui/modules/views/player_stats.py index 16bb115..0baf5b4 100644 --- a/src/gui/modules/views/player_stats.py +++ b/src/gui/modules/views/player_stats.py @@ -1,8 +1,8 @@ import datetime -from PySide2.QtWidgets import QLabel # type: ignore -from PySide2 import QtGui # type: ignore -from PySide2 import QtCore # type: ignore +from PySide6.QtWidgets import QLabel # type: ignore +from PySide6 import QtGui # type: ignore +from PySide6 import QtCore # type: ignore from src.utils import assets, number from src.stats.list_item import PlayerListItem diff --git a/src/gui/modules/views/reset_button.py b/src/gui/modules/views/reset_button.py index 0c1a987..4cbdd10 100644 --- a/src/gui/modules/views/reset_button.py +++ b/src/gui/modules/views/reset_button.py @@ -1,8 +1,8 @@ from typing import Callable -from PySide2.QtWidgets import QPushButton # type: ignore -from PySide2 import QtGui # type: ignore +from PySide6.QtWidgets import QPushButton # type: ignore +from PySide6 import QtGui # type: ignore from ....utils import assets from ....stats.list_item import PlayerListItem