mirror of
https://github.com/KenanZhu/AutoLibrary.git
synced 2026-06-18 23:43:02 +08:00
style(*): remove the spare punctuation marks ',' at the end of function parameters
This commit is contained in:
+5
-5
@@ -30,7 +30,7 @@ class AutoLib(MsgBase):
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
input_queue: queue.Queue,
|
input_queue: queue.Queue,
|
||||||
output_queue: queue.Queue,
|
output_queue: queue.Queue
|
||||||
):
|
):
|
||||||
super().__init__(input_queue, output_queue)
|
super().__init__(input_queue, output_queue)
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@ class AutoLib(MsgBase):
|
|||||||
|
|
||||||
|
|
||||||
def __waitResponseLoad(
|
def __waitResponseLoad(
|
||||||
self,
|
self
|
||||||
) -> bool:
|
) -> bool:
|
||||||
|
|
||||||
# wait for page load
|
# wait for page load
|
||||||
@@ -154,7 +154,7 @@ class AutoLib(MsgBase):
|
|||||||
self,
|
self,
|
||||||
username: str,
|
username: str,
|
||||||
password: str,
|
password: str,
|
||||||
reserve_info: dict,
|
reserve_info: dict
|
||||||
) -> int:
|
) -> int:
|
||||||
|
|
||||||
# result : 0 - success, 1 - failed, 2 - passed
|
# result : 0 - success, 1 - failed, 2 - passed
|
||||||
@@ -202,7 +202,7 @@ class AutoLib(MsgBase):
|
|||||||
def run(
|
def run(
|
||||||
self,
|
self,
|
||||||
system_config_reader: ConfigReader,
|
system_config_reader: ConfigReader,
|
||||||
users_config_reader: ConfigReader,
|
users_config_reader: ConfigReader
|
||||||
):
|
):
|
||||||
|
|
||||||
self.__system_config_reader = system_config_reader
|
self.__system_config_reader = system_config_reader
|
||||||
@@ -245,7 +245,7 @@ class AutoLib(MsgBase):
|
|||||||
|
|
||||||
|
|
||||||
def close(
|
def close(
|
||||||
self,
|
self
|
||||||
) -> bool:
|
) -> bool:
|
||||||
|
|
||||||
if self.__driver:
|
if self.__driver:
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@ class LibCheckout(LibOperator):
|
|||||||
|
|
||||||
|
|
||||||
def _waitResponseLoad(
|
def _waitResponseLoad(
|
||||||
self,
|
self
|
||||||
) -> bool:
|
) -> bool:
|
||||||
|
|
||||||
pass
|
pass
|
||||||
+8
-8
@@ -36,7 +36,7 @@ class LibLogin(LibOperator):
|
|||||||
|
|
||||||
|
|
||||||
def _waitResponseLoad(
|
def _waitResponseLoad(
|
||||||
self,
|
self
|
||||||
) -> bool:
|
) -> bool:
|
||||||
|
|
||||||
# wait to verify login success
|
# wait to verify login success
|
||||||
@@ -59,7 +59,7 @@ class LibLogin(LibOperator):
|
|||||||
def __fillLogInElements(
|
def __fillLogInElements(
|
||||||
self,
|
self,
|
||||||
username: str,
|
username: str,
|
||||||
password: str,
|
password: str
|
||||||
) -> bool:
|
) -> bool:
|
||||||
|
|
||||||
# ensure elements presence and fill them
|
# ensure elements presence and fill them
|
||||||
@@ -77,7 +77,7 @@ class LibLogin(LibOperator):
|
|||||||
|
|
||||||
|
|
||||||
def __autoRecognizeCaptcha(
|
def __autoRecognizeCaptcha(
|
||||||
self,
|
self
|
||||||
) -> str:
|
) -> str:
|
||||||
|
|
||||||
# auto recognize captcha
|
# auto recognize captcha
|
||||||
@@ -99,7 +99,7 @@ class LibLogin(LibOperator):
|
|||||||
|
|
||||||
|
|
||||||
def __manualRecognizeCaptcha(
|
def __manualRecognizeCaptcha(
|
||||||
self,
|
self
|
||||||
) -> str:
|
) -> str:
|
||||||
|
|
||||||
# manual recognize captcha
|
# manual recognize captcha
|
||||||
@@ -117,7 +117,7 @@ class LibLogin(LibOperator):
|
|||||||
|
|
||||||
|
|
||||||
def __refreshCaptcha(
|
def __refreshCaptcha(
|
||||||
self,
|
self
|
||||||
):
|
):
|
||||||
|
|
||||||
# refresh captcha
|
# refresh captcha
|
||||||
@@ -136,7 +136,7 @@ class LibLogin(LibOperator):
|
|||||||
|
|
||||||
def __solveCaptcha(
|
def __solveCaptcha(
|
||||||
self,
|
self,
|
||||||
auto_captcha: bool = True,
|
auto_captcha: bool = True
|
||||||
) -> str:
|
) -> str:
|
||||||
|
|
||||||
max_attempts = 5
|
max_attempts = 5
|
||||||
@@ -155,7 +155,7 @@ class LibLogin(LibOperator):
|
|||||||
|
|
||||||
def __fillCaptchaElement(
|
def __fillCaptchaElement(
|
||||||
self,
|
self,
|
||||||
captcha_text: str,
|
captcha_text: str
|
||||||
) -> bool:
|
) -> bool:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -174,7 +174,7 @@ class LibLogin(LibOperator):
|
|||||||
username: str,
|
username: str,
|
||||||
password: str,
|
password: str,
|
||||||
max_attempts: int = 5,
|
max_attempts: int = 5,
|
||||||
auto_captcha: bool = True,
|
auto_captcha: bool = True
|
||||||
) -> bool:
|
) -> bool:
|
||||||
|
|
||||||
if self.__driver is None:
|
if self.__driver is None:
|
||||||
|
|||||||
+3
-3
@@ -22,7 +22,7 @@ class LibLogout(LibOperator):
|
|||||||
self,
|
self,
|
||||||
input_queue: queue.Queue,
|
input_queue: queue.Queue,
|
||||||
output_queue: queue.Queue,
|
output_queue: queue.Queue,
|
||||||
driver,
|
driver
|
||||||
):
|
):
|
||||||
|
|
||||||
super().__init__(input_queue, output_queue)
|
super().__init__(input_queue, output_queue)
|
||||||
@@ -31,7 +31,7 @@ class LibLogout(LibOperator):
|
|||||||
|
|
||||||
|
|
||||||
def _waitResponseLoad(
|
def _waitResponseLoad(
|
||||||
self,
|
self
|
||||||
) -> bool:
|
) -> bool:
|
||||||
|
|
||||||
return True
|
return True
|
||||||
@@ -39,7 +39,7 @@ class LibLogout(LibOperator):
|
|||||||
|
|
||||||
def logout(
|
def logout(
|
||||||
self,
|
self,
|
||||||
username: str,
|
username: str
|
||||||
) -> bool:
|
) -> bool:
|
||||||
|
|
||||||
if self.__driver is None:
|
if self.__driver is None:
|
||||||
|
|||||||
+2
-2
@@ -17,14 +17,14 @@ class LibOperator(MsgBase):
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
input_queue: queue.Queue,
|
input_queue: queue.Queue,
|
||||||
output_queue: queue.Queue,
|
output_queue: queue.Queue
|
||||||
):
|
):
|
||||||
|
|
||||||
super().__init__(input_queue, output_queue)
|
super().__init__(input_queue, output_queue)
|
||||||
|
|
||||||
|
|
||||||
def _waitResponseLoad(
|
def _waitResponseLoad(
|
||||||
self,
|
self
|
||||||
) -> bool:
|
) -> bool:
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@ class LibRenew(LibOperator):
|
|||||||
|
|
||||||
|
|
||||||
def _waitResponseLoad(
|
def _waitResponseLoad(
|
||||||
self,
|
self
|
||||||
) -> bool:
|
) -> bool:
|
||||||
|
|
||||||
pass
|
pass
|
||||||
+1
-1
@@ -265,7 +265,7 @@ class LibReserve(LibOperator):
|
|||||||
trigger_locator: tuple,
|
trigger_locator: tuple,
|
||||||
fail_msg: str,
|
fail_msg: str,
|
||||||
success_msg: str,
|
success_msg: str,
|
||||||
option_locator: tuple = None,
|
option_locator: tuple = None
|
||||||
) -> bool:
|
) -> bool:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
+3
-3
@@ -16,7 +16,7 @@ class MsgBase:
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
input_queue: queue.Queue,
|
input_queue: queue.Queue,
|
||||||
output_queue: queue.Queue,
|
output_queue: queue.Queue
|
||||||
):
|
):
|
||||||
|
|
||||||
self._class_name = self.__class__.__name__
|
self._class_name = self.__class__.__name__
|
||||||
@@ -43,7 +43,7 @@ class MsgBase:
|
|||||||
|
|
||||||
def _waitMsg(
|
def _waitMsg(
|
||||||
self,
|
self,
|
||||||
timeout: float = 1.0,
|
timeout: float = 1.0
|
||||||
) -> str:
|
) -> str:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -55,7 +55,7 @@ class MsgBase:
|
|||||||
|
|
||||||
def _inputMsg(
|
def _inputMsg(
|
||||||
self,
|
self,
|
||||||
timeout: float = 1.0,
|
timeout: float = 1.0
|
||||||
) -> bool:
|
) -> bool:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -569,7 +569,7 @@ class ALConfigWidget(QWidget, Ui_ALConfigWidget):
|
|||||||
|
|
||||||
@Slot()
|
@Slot()
|
||||||
def onFloorComboBoxCurrentIndexChanged(
|
def onFloorComboBoxCurrentIndexChanged(
|
||||||
self,
|
self
|
||||||
):
|
):
|
||||||
|
|
||||||
floor = self.FloorComboBox.currentText()
|
floor = self.FloorComboBox.currentText()
|
||||||
|
|||||||
+9
-9
@@ -163,7 +163,7 @@ class ALMainWindow(QMainWindow, Ui_ALMainWindow):
|
|||||||
|
|
||||||
def closeEvent(
|
def closeEvent(
|
||||||
self,
|
self,
|
||||||
event: QCloseEvent,
|
event: QCloseEvent
|
||||||
):
|
):
|
||||||
|
|
||||||
if self.__timer and self.__timer.isActive():
|
if self.__timer and self.__timer.isActive():
|
||||||
@@ -175,7 +175,7 @@ class ALMainWindow(QMainWindow, Ui_ALMainWindow):
|
|||||||
|
|
||||||
def appendToTextEdit(
|
def appendToTextEdit(
|
||||||
self,
|
self,
|
||||||
text: str,
|
text: str
|
||||||
):
|
):
|
||||||
|
|
||||||
cursor = self.MessageIOTextEdit.textCursor()
|
cursor = self.MessageIOTextEdit.textCursor()
|
||||||
@@ -200,7 +200,7 @@ class ALMainWindow(QMainWindow, Ui_ALMainWindow):
|
|||||||
self,
|
self,
|
||||||
config_button_enabled: bool,
|
config_button_enabled: bool,
|
||||||
start_button_enabled: bool,
|
start_button_enabled: bool,
|
||||||
stop_button_enabled: bool,
|
stop_button_enabled: bool
|
||||||
):
|
):
|
||||||
|
|
||||||
self.ConfigButton.setEnabled(config_button_enabled)
|
self.ConfigButton.setEnabled(config_button_enabled)
|
||||||
@@ -210,7 +210,7 @@ class ALMainWindow(QMainWindow, Ui_ALMainWindow):
|
|||||||
@Slot()
|
@Slot()
|
||||||
def showMsg(
|
def showMsg(
|
||||||
self,
|
self,
|
||||||
msg: str,
|
msg: str
|
||||||
):
|
):
|
||||||
|
|
||||||
self.appendToTextEdit(f"[{self.__class_name:<12}] >>> : {msg}")
|
self.appendToTextEdit(f"[{self.__class_name:<12}] >>> : {msg}")
|
||||||
@@ -218,7 +218,7 @@ class ALMainWindow(QMainWindow, Ui_ALMainWindow):
|
|||||||
@Slot()
|
@Slot()
|
||||||
def showTrace(
|
def showTrace(
|
||||||
self,
|
self,
|
||||||
msg: str,
|
msg: str
|
||||||
):
|
):
|
||||||
|
|
||||||
timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
|
timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
|
||||||
@@ -226,7 +226,7 @@ class ALMainWindow(QMainWindow, Ui_ALMainWindow):
|
|||||||
|
|
||||||
@Slot()
|
@Slot()
|
||||||
def pollMsgQueue(
|
def pollMsgQueue(
|
||||||
self,
|
self
|
||||||
):
|
):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -239,7 +239,7 @@ class ALMainWindow(QMainWindow, Ui_ALMainWindow):
|
|||||||
@Slot(dict)
|
@Slot(dict)
|
||||||
def onConfigWidgetClosed(
|
def onConfigWidgetClosed(
|
||||||
self,
|
self,
|
||||||
config_paths: dict,
|
config_paths: dict
|
||||||
):
|
):
|
||||||
|
|
||||||
self.__alConfigWidget = None
|
self.__alConfigWidget = None
|
||||||
@@ -250,7 +250,7 @@ class ALMainWindow(QMainWindow, Ui_ALMainWindow):
|
|||||||
|
|
||||||
@Slot()
|
@Slot()
|
||||||
def onConfigButtonClicked(
|
def onConfigButtonClicked(
|
||||||
self,
|
self
|
||||||
):
|
):
|
||||||
|
|
||||||
if self.__alConfigWidget is None:
|
if self.__alConfigWidget is None:
|
||||||
@@ -268,7 +268,7 @@ class ALMainWindow(QMainWindow, Ui_ALMainWindow):
|
|||||||
|
|
||||||
@Slot()
|
@Slot()
|
||||||
def onStartButtonClicked(
|
def onStartButtonClicked(
|
||||||
self,
|
self
|
||||||
):
|
):
|
||||||
|
|
||||||
self.setControlButtons(False, False, True)
|
self.setControlButtons(False, False, True)
|
||||||
|
|||||||
Reference in New Issue
Block a user