1
0
Fork 0
mirror of synced 2024-06-26 10:11:19 +12:00

Code cleanup: Use pass instead of ellipsis (...) for abstractmethods

Fix a few other issues pointed out by MultisampledNight

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
This commit is contained in:
loathingKernel 2023-02-20 15:31:04 +02:00
parent 7a04f7b5be
commit a3d09ae288
5 changed files with 14 additions and 16 deletions

View file

@ -175,7 +175,7 @@ class MainWindow(QMainWindow):
self.queued_container.layout().removeWidget(label)
label.deleteLater()
stylesheet = """
QLabel#QueueWorkerLabel {{
QLabel#QueueWorkerLabel {{
border-radius: 3px;
border: 1px solid {br_color};
background-color: {bg_color};

View file

@ -143,7 +143,7 @@ class QueueGroup(QGroupBox):
self.__container.layout().insertWidget(0, widget)
if self.count() > 1:
app_name = self.__queue[1]
other: QueueWidget = self.__find_widget(app_name)
other: QueueWidget = self.__find_widget(app_name)
other.toggle_arrows(1, len(self.__queue))
def push_back(self, item: InstallQueueItemModel, old_igame: InstalledGame):
@ -154,7 +154,7 @@ class QueueGroup(QGroupBox):
self.__container.layout().addWidget(widget)
if self.count() > 1:
app_name = self.__queue[-2]
other: QueueWidget = self.__find_widget(app_name)
other: QueueWidget = self.__find_widget(app_name)
other.toggle_arrows(len(self.__queue) - 2, len(self.__queue))
def pop_front(self) -> InstallQueueItemModel:
@ -173,12 +173,12 @@ class QueueGroup(QGroupBox):
for idx in [0, 1]:
if self.count() > idx:
app_name = self.__queue[idx]
widget: QueueWidget = self.__find_widget(app_name)
widget: QueueWidget = self.__find_widget(app_name)
widget.toggle_arrows(idx, len(self.__queue))
for idx in [1, 2]:
if self.count() > idx:
app_name = self.__queue[-idx]
widget: QueueWidget = self.__find_widget(app_name)
widget: QueueWidget = self.__find_widget(app_name)
widget.toggle_arrows(len(self.__queue) - idx, len(self.__queue))
def __remove(self, app_name: str):

View file

@ -189,8 +189,8 @@ class EGLSyncListItem(QListWidgetItem):
return self.checkState() == Qt.Checked
@abstractmethod
def action(self) -> Union[str,bool]:
...
def action(self) -> Union[str, bool]:
pass
@property
def app_name(self):
@ -199,7 +199,7 @@ class EGLSyncListItem(QListWidgetItem):
@property
@abstractmethod
def app_title(self) -> str:
...
pass
class EGLSyncExportItem(EGLSyncListItem):
@ -279,12 +279,12 @@ class EGLSyncListGroup(QGroupBox):
@abstractmethod
def action(self):
...
pass
@pyqtSlot(list)
@abstractmethod
def show_errors(self, errors: List):
...
pass
@property
def items(self) -> Iterable[EGLSyncListItem]:

View file

@ -431,7 +431,6 @@ class RareGame(RareGameSlim):
ret = False
return ret
@property
def needs_verification(self) -> bool:
"""!
@ -633,7 +632,6 @@ class RareGame(RareGameSlim):
if ask_sync_saves:
args.extend("--ask-sync-saves")
# kill me, if I don't change it before commit
QProcess.startDetached(executable, args)
logger.info(f"Start new Process: ({executable} {' '.join(args)})")
self.game_process.connect_to_server(on_startup=False)

View file

@ -42,19 +42,19 @@ class CollapsibleBase(object):
@abstractmethod
def isChecked(self) -> bool:
...
pass
@abstractmethod
def click(self) -> None:
...
pass
@abstractmethod
def addToLayout(self, widget: QWidget) -> None:
...
pass
@abstractmethod
def sizeHint(self) -> QSize:
...
pass
def animationStart(self, checked):
direction = QAbstractAnimation.Forward if checked else QAbstractAnimation.Backward