Skip to content

Commit

Permalink
style: Black up
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramimashkouk committed Jul 9, 2024
1 parent 102bd69 commit 0d6e564
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions backend/df_designer/app/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
import sys
from pathlib import Path

import nest_asyncio
import typer
from cookiecutter.main import cookiecutter

import nest_asyncio
# Patch nest_asyncio before import DFF
# Patch nest_asyncio before importing DFF
nest_asyncio.apply = lambda: None

from app.core.config import settings, app_runner
from app.core.logger_config import get_logger
from app.core.config import app_runner, settings # noqa: E402
from app.core.logger_config import get_logger # noqa: E402

cli = typer.Typer()

Expand Down
10 changes: 5 additions & 5 deletions backend/df_designer/app/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from pathlib import Path

import uvicorn
from pydantic_settings import BaseSettings
from dotenv import load_dotenv
from pydantic_settings import BaseSettings

load_dotenv()

Expand All @@ -20,8 +20,8 @@ class Settings(BaseSettings):

host: str = os.getenv("HOST", "0.0.0.0")
port: int = int(os.getenv("PORT", 8000))
log_level: str = os.getenv('LOG_LEVEL', 'info')
conf_reload: bool = os.getenv('CONF_RELOAD', 'true').lower() in ['true', '1', 't', 'y', 'yes']
log_level: str = os.getenv("LOG_LEVEL", "info")
conf_reload: bool = os.getenv("CONF_RELOAD", "true").lower() in ["true", "1", "t", "y", "yes"]

builds_path: Path = Path(f"{work_directory}/df_designer/builds.yaml")
runs_path: Path = Path(f"{work_directory}/df_designer/runs.yaml")
Expand All @@ -36,7 +36,7 @@ def __init__(self, settings: Settings):
self.settings = settings

def run(self):
if reload:= self.settings.conf_reload:
if reload := self.settings.conf_reload:
reload_conf = {
"reload": reload,
"reload_dirs": [self.settings.work_directory, str(self.settings.package_dir)],
Expand All @@ -49,7 +49,7 @@ def run(self):
host=self.settings.host,
port=self.settings.port,
log_level=self.settings.log_level,
**reload_conf
**reload_conf,
)


Expand Down

0 comments on commit 0d6e564

Please sign in to comment.