diff --git a/.pylintrc b/.pylintrc
index d31ba5f..4b22774 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -440,6 +440,7 @@ disable=raw-checker-failed,
R0903, # too-few-public-methods
R0913, # too-many-arguments
R0914, # too-many-locals
+ R0915, # too-many-statements
W0718, # broad-exception-caught
# Enable the message, report, category or checker with the given id(s). You can
diff --git a/clashroyalebuildabot/gui/gameplay_widget.py b/clashroyalebuildabot/gui/gameplay_widget.py
index 2e283d7..39748b5 100644
--- a/clashroyalebuildabot/gui/gameplay_widget.py
+++ b/clashroyalebuildabot/gui/gameplay_widget.py
@@ -15,7 +15,15 @@ def __init__(self):
"The visualizer is disabled. Enable it in the Settings tab."
)
self.inactiveIndicator.setStyleSheet(
- "background-color: #FFA500; color: white; padding: 5px; height: fit-content; width: fit-content;"
+ " ".join(
+ [
+ "background-color: #FFA500;",
+ "color: white;",
+ "padding: 5px;",
+ "height: fit-content;",
+ "width: fit-content;",
+ ]
+ )
)
self.inactiveIndicator.setMaximumHeight(30)
layout = QVBoxLayout()
@@ -24,7 +32,7 @@ def __init__(self):
self.setLayout(layout)
def update_frame(self, annotated_image):
- height, width, channel = annotated_image.shape
+ height, width, _ = annotated_image.shape
bytes_per_line = 3 * width
q_image = QImage(
annotated_image.data.tobytes(),
diff --git a/clashroyalebuildabot/gui/layout_setup.py b/clashroyalebuildabot/gui/layout_setup.py
index b62b21f..51664d2 100644
--- a/clashroyalebuildabot/gui/layout_setup.py
+++ b/clashroyalebuildabot/gui/layout_setup.py
@@ -48,9 +48,8 @@ def setup_top_bar(main_window):
)
text_layout.addWidget(server_name)
- server_details = QLabel(
- 'https://github.com/Pbatch/ClashRoyaleBuildABot'
- )
+ url = "https://github.com/Pbatch/ClashRoyaleBuildABot"
+ server_details = QLabel(f'{url}')
server_details.setOpenExternalLinks(True)
server_details.setStyleSheet("color: #57A6FF;")
text_layout.addWidget(server_details)
diff --git a/clashroyalebuildabot/gui/utils.py b/clashroyalebuildabot/gui/utils.py
index 0d57e68..6b6bcfa 100644
--- a/clashroyalebuildabot/gui/utils.py
+++ b/clashroyalebuildabot/gui/utils.py
@@ -1,20 +1,20 @@
import os
from loguru import logger
-from ruamel.yaml import YAML
+import yaml
from clashroyalebuildabot.constants import SRC_DIR
-yaml = YAML()
-
def load_config():
+ config = None
try:
config_path = os.path.join(SRC_DIR, "config.yaml")
with open(config_path, encoding="utf-8") as file:
- return yaml.load(file)
+ config = yaml.safe_load(file)
except Exception as e:
logger.error(f"Can't parse config, stacktrace: {e}")
+ return config
def save_config(config):
diff --git a/pyproject.toml b/pyproject.toml
index f5a0fc6..12dde54 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -20,9 +20,10 @@ dependencies = [
"scipy>=1.13.1",
"rich>=13.7.1",
"loguru>=0.7.2",
- "PyYAML",
+ "PyYAML>=6.0.1",
"pybind11>=2.12",
"requests>=2.25.1",
+ "PyQt6>=6.7.1",
"av",
"tqdm",
"opencv-python==4.10.0.84",
@@ -31,8 +32,7 @@ dependencies = [
"flake8==7.0.0",
"isort==5.13.2",
"pylint==3.1.0",
- "ruamel.yaml>=0.18.6",
- "PyQt6>=6.7.1"
+
]
[project.optional-dependencies]
cpu = [