Fix formatting errors warnings
This commit is contained in:
parent
eadd7a5612
commit
cf96371b90
5 changed files with 5 additions and 14 deletions
|
|
@ -1,7 +1,3 @@
|
|||
import os
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
from newsreader.conf.utils import get_env, get_root_dir
|
||||
|
|
@ -186,9 +182,7 @@ USE_TZ = True
|
|||
|
||||
STATIC_URL = "/static/"
|
||||
STATIC_ROOT = BASE_DIR / "static"
|
||||
STATICFILES_DIRS = (
|
||||
DJANGO_PROJECT_DIR / "static",
|
||||
)
|
||||
STATICFILES_DIRS = (DJANGO_PROJECT_DIR / "static",)
|
||||
|
||||
STATICFILES_FINDERS = [
|
||||
"django.contrib.staticfiles.finders.FileSystemFinder",
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
|
|||
INSTALLED_APPS += ["debug_toolbar", "django_extensions"] # noqa: F405
|
||||
|
||||
|
||||
TEMPLATES[0]["OPTIONS"]["context_processors"].append(
|
||||
TEMPLATES[0]["OPTIONS"]["context_processors"].append( # noqa: F405
|
||||
"django.template.context_processors.debug",
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ LOGGING["loggers"].update( # noqa: F405
|
|||
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
|
||||
|
||||
|
||||
TEMPLATES[0]["OPTIONS"]["context_processors"].append(
|
||||
TEMPLATES[0]["OPTIONS"]["context_processors"].append( # noqa: F405
|
||||
"django.template.context_processors.debug",
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import os
|
||||
|
||||
from newsreader.conf.utils import get_env
|
||||
|
||||
from .base import * # noqa: F403
|
||||
|
|
@ -11,8 +9,7 @@ DEBUG = False
|
|||
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
|
||||
|
||||
ADMINS = [
|
||||
("", email)
|
||||
for email in get_env("ADMINS", split=",", required=False, default=[])
|
||||
("", email) for email in get_env("ADMINS", split=",", required=False, default=[])
|
||||
]
|
||||
|
||||
# Project settings
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ def get_env(
|
|||
cast: Type = str,
|
||||
required: bool = True,
|
||||
default: Any = None,
|
||||
split: str = ""
|
||||
split: str = "",
|
||||
) -> Any:
|
||||
if cast is not str and split:
|
||||
raise TypeError(f"Split is not possible with {cast}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue