Fix formatting

This commit is contained in:
Andras Schmelczer 2022-06-25 19:05:43 +02:00
parent 8968e6c5bd
commit a2c46bf015
No known key found for this signature in database
GPG key ID: 0EA1BC97D0AB076E

View file

@ -67,9 +67,12 @@ def main() -> None:
uvicorn.run(app, **common_config)
else:
class EventHandler(PatternMatchingEventHandler):
def __init__(self) -> None:
super().__init__(patterns=["*.py", "*.ipynb"], ignore_patterns=["__*.py"])
super().__init__(
patterns=["*.py", "*.ipynb"], ignore_patterns=["__*.py"]
)
self.server: Optional[GreatAIReload] = None
self.restart()
@ -109,7 +112,9 @@ def main() -> None:
observer.stop()
restart_handler.stop_server()
if args.file_name.endswith(".ipynb"):
Path(get_script_name_of_notebook(args.file_name)).unlink(missing_ok=True)
Path(get_script_name_of_notebook(args.file_name)).unlink(
missing_ok=True
)
observer.join()