Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 15, 2024
1 parent 606588a commit 16faef2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions robyn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
from robyn.processpool import run_processes
from robyn.reloader import compile_rust_files
from robyn.responses import html, serve_file, serve_html
from robyn.robyn import (FunctionInfo, Headers, HttpMethod, Request, Response,
WebSocketConnector, get_version)
from robyn.router import (MiddlewareRouter, MiddlewareType, Router,
WebSocketRouter)
from robyn.robyn import FunctionInfo, Headers, HttpMethod, Request, Response, WebSocketConnector, get_version
from robyn.router import MiddlewareRouter, MiddlewareType, Router, WebSocketRouter
from robyn.types import Directory
from robyn.ws import WebSocket

Expand Down Expand Up @@ -51,7 +49,7 @@ def __init__(
self.config = config
self.dependencies = dependencies

if 'robyn' in os.path.basename(sys.argv[0]).lower():
if "robyn" in os.path.basename(sys.argv[0]).lower():
# the env variables are already set when are running through the cli
load_vars(project_root=directory_path)

Expand Down
6 changes: 3 additions & 3 deletions robyn/reloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ def reload(self):
new_env = os.environ.copy()
new_env["IS_RELOADER_RUNNING"] = "True" # This is used to check if a reloader is already running
# IS_RELOADER_RUNNING is specifically used for IPC between the reloader and the server

if "ROBYN_DEV_MODE" in new_env:
# we are deleting the ROBYN_DEV_MODE environment variable as the
# child processes should not be in dev mode, i.e. can be killed by the reloader
# we are deleting the ROBYN_DEV_MODE environment variable as the
# child processes should not be in dev mode, i.e. can be killed by the reloader
del new_env["ROBYN_DEV_MODE"]

# print(f"Reloading {self.file_path}...", new_env["ROBYN_DEV_MODE"])
Expand Down

0 comments on commit 16faef2

Please sign in to comment.