AutoPEP8 (removed extra whitespaces)

This commit is contained in:
DarkCat09 2023-02-27 19:05:57 +04:00
parent 1d9fa011a3
commit 2a2175e31a
7 changed files with 7 additions and 5 deletions

View file

@ -22,6 +22,7 @@ class Settings(BaseSettings):
session_key: str = secrets.token_hex(32) session_key: str = secrets.token_hex(32)
csrf_key: str = secrets.token_hex(32) csrf_key: str = secrets.token_hex(32)
settings = Settings() settings = Settings()

View file

@ -25,5 +25,5 @@ async def get_form(
Returns: Returns:
StarletteForm instance StarletteForm instance
""" """
return await form.from_formdata(request=req) return await form.from_formdata(request=req)

View file

@ -17,7 +17,7 @@ class Paths(abc.ABC):
""" """
self.app = app self.app = app
@abc.abstractmethod @abc.abstractmethod
def add_paths(self) -> None: def add_paths(self) -> None:
"""Add paths to the FastAPI application""" """Add paths to the FastAPI application"""

View file

@ -23,7 +23,7 @@ class ErrorsPaths(Paths):
# For each HTTP code specified above # For each HTTP code specified above
for code in codes: for code in codes:
self.add_handler(code) self.add_handler(code)
def add_handler(self, code: int) -> None: def add_handler(self, code: int) -> None:
"""Adds an error handler to FastAPI app. """Adds an error handler to FastAPI app.
Only for internal use! Only for internal use!

View file

@ -51,7 +51,7 @@ class TablePaths(Paths):
if form.pswd.data != '1234': if form.pswd.data != '1234':
return respond.with_text('Incorrect password') return respond.with_text('Incorrect password')
crud.create_user( crud.create_user(
db=db_s, db=db_s,
user=schemas.UserCreate( user=schemas.UserCreate(

View file

@ -135,7 +135,7 @@ def with_file(
return FileResponse( return FileResponse(
path=path, path=path,
media_type=( media_type=(
mime or mime or
mimetypes.guess_type(path)[0] mimetypes.guess_type(path)[0]
), ),
status_code=code, status_code=code,

View file

@ -17,6 +17,7 @@ class SqlSettings(BaseSettings):
db_password: str = '' db_password: str = ''
db_database: str = '${REPO_NAME_SNAKE}' db_database: str = '${REPO_NAME_SNAKE}'
sql_settings = SqlSettings() sql_settings = SqlSettings()
# DB connection URL # DB connection URL