Skip to content

Commit 5e6cc46

Browse files
committed
MNT: Annotate MISC session functions
- add annotations to wait_for_file, execute, wait and sleep functions
1 parent e9ddca5 commit 5e6cc46

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

botcity/core/bot.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1771,7 +1771,7 @@ def delete(self, wait: int = 0) -> None:
17711771
# Misc
17721772
######
17731773

1774-
def wait_for_file(self, path, timeout=10000):
1774+
def wait_for_file(self, path: str, timeout: int = 10000) -> bool:
17751775
"""
17761776
Invoke the system handler to open the given file.
17771777
@@ -1793,7 +1793,7 @@ def wait_for_file(self, path, timeout=10000):
17931793
return True
17941794
self.sleep(config.DEFAULT_SLEEP_AFTER_ACTION)
17951795

1796-
def execute(self, file_path):
1796+
def execute(self, file_path: str) -> None:
17971797
"""
17981798
Invoke the system handler to open the given file.
17991799
@@ -1805,7 +1805,7 @@ def execute(self, file_path):
18051805
else:
18061806
subprocess.Popen(file_path.split(" "))
18071807

1808-
def wait(self, interval):
1808+
def wait(self, interval: int) -> None:
18091809
"""
18101810
Wait / Sleep for a given interval.
18111811
@@ -1815,7 +1815,7 @@ def wait(self, interval):
18151815
"""
18161816
time.sleep(interval / 1000.0)
18171817

1818-
def sleep(self, interval):
1818+
def sleep(self, interval: int) -> None:
18191819
"""
18201820
Wait / Sleep for a given interval.
18211821

0 commit comments

Comments
 (0)