Improved code readability x 2

This commit is contained in:
coder2020official 2022-10-01 22:34:49 +04:00
parent b523cec22f
commit 2d1f39085d
2 changed files with 6 additions and 6 deletions

View File

@ -900,9 +900,9 @@ class TeleBot:
path = sys.argv[sys.argv.index('--path') + 1] if '--path' in sys.argv else '.'
self.observer = Observer()
self.observer.schedule(self.event_handler, path, recursive=True)
self.observer.start()
self.event_observer = Observer()
self.event_observer.schedule(self.event_handler, path, recursive=True)
self.event_observer.start()
def infinity_polling(self, timeout: Optional[int]=20, skip_pending: Optional[bool]=False, long_polling_timeout: Optional[int]=20,
logger_level: Optional[int]=logging.ERROR, allowed_updates: Optional[List[str]]=None,

View File

@ -233,9 +233,9 @@ class AsyncTeleBot:
# Make it possible to specify --path argument to the script
path = sys.argv[sys.argv.index('--path') + 1] if '--path' in sys.argv else '.'
self.observer = Observer()
self.observer.schedule(self.event_handler, path, recursive=True)
self.observer.start()
self.event_observer = Observer()
self.event_observer.schedule(self.event_handler, path, recursive=True)
self.event_observer.start()
async def polling(self, non_stop: bool=False, skip_pending=False, interval: int=0, timeout: int=20,
request_timeout: Optional[int]=None, allowed_updates: Optional[List[str]]=None,