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 Jun 13, 2023
1 parent dc031e3 commit 12f7641
Show file tree
Hide file tree
Showing 28 changed files with 264 additions and 275 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ indent_style = tab
max_line_length = 79

[*.yml]
indent_size = 2
indent_size = 2
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
# TO STOP
docker-compose stop django
docker-compose stop frontend
```
```
2 changes: 1 addition & 1 deletion core/.coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ omit = */migrations/*
[paths]
source =
apps/
config/
config/
2 changes: 1 addition & 1 deletion core/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ coverage.xml
.git
.mypy_cache
.pytest_cache
.hypothesis
.hypothesis
1 change: 0 additions & 1 deletion core/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,3 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

2 changes: 1 addition & 1 deletion core/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Django starts so that shared_task will use this app.
from .celery import app as celery_app

__all__ = ('celery_app',)
__all__ = ("celery_app",)
2 changes: 1 addition & 1 deletion core/config/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

from django.core.asgi import get_asgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")

application = get_asgi_application()
75 changes: 36 additions & 39 deletions core/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = env('SECRET_KEY')
SECRET_KEY = env("SECRET_KEY")

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = env.bool("DEBUG")
Expand All @@ -33,52 +33,51 @@

# Application definition
DJANGO_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
]

THIRD_PARTY_APPS = [
"django_celery_beat",
"rest_framework",
"corsheaders",
"drf_spectacular",
'django_filters',
"django_filters",
"django_extensions",
]

DEBUG_APPS = [
"debug_toolbar",
]

CREATE_APPS = [
]
CREATE_APPS = []


INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + DEBUG_APPS + CREATE_APPS

MIDDLEWARE = [
"corsheaders.middleware.CorsMiddleware",
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
]

ROOT_URLCONF = 'config.urls'
ROOT_URLCONF = "config.urls"

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [str(BASE_DIR / "templates")],
'APP_DIRS': True,
'OPTIONS': {
"APP_DIRS": True,
"OPTIONS": {
# https://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors
"context_processors": [
"django.template.context_processors.debug",
Expand All @@ -94,20 +93,20 @@
},
]

WSGI_APPLICATION = 'config.wsgi.application'
WSGI_APPLICATION = "config.wsgi.application"


# Database
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': env("POSTGRES_DB"),
'USER': env("POSTGRES_USER"),
'PASSWORD': env("POSTGRES_PASSWORD"),
'HOST': env("POSTGRES_HOST"),
'PORT': env("POSTGRES_PORT"),
"default": {
"ENGINE": "django.db.backends.postgresql_psycopg2",
"NAME": env("POSTGRES_DB"),
"USER": env("POSTGRES_USER"),
"PASSWORD": env("POSTGRES_PASSWORD"),
"HOST": env("POSTGRES_HOST"),
"PORT": env("POSTGRES_PORT"),
}
}

Expand All @@ -117,26 +116,26 @@

AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
},
]


# Internationalization
# https://docs.djangoproject.com/en/4.2/topics/i18n/

LANGUAGE_CODE = 'en-us'
LANGUAGE_CODE = "en-us"

TIME_ZONE = 'UTC'
TIME_ZONE = "UTC"

USE_I18N = True

Expand Down Expand Up @@ -167,7 +166,7 @@
# Default primary key field type
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

# CELERY
# ------------------------------------------------------------------------------
Expand All @@ -194,9 +193,7 @@
CELERY_BEAT_SCHEDULER = "django_celery_beat.schedulers:DatabaseScheduler"

REST_FRAMEWORK = {
'DEFAULT_FILTER_BACKENDS': (
'django_filters.rest_framework.DjangoFilterBackend',
),
"DEFAULT_FILTER_BACKENDS": ("django_filters.rest_framework.DjangoFilterBackend",),
"DEFAULT_AUTHENTICATION_CLASSES": (
"rest_framework.authentication.SessionAuthentication",
),
Expand Down
2 changes: 1 addition & 1 deletion core/config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

urlpatterns = [
# ADMIN URLS
path('admin/', admin.site.urls),
path("admin/", admin.site.urls),
# REST URLS
path("api/schema/", SpectacularAPIView.as_view(), name="api-schema"),
path(
Expand Down
2 changes: 1 addition & 1 deletion core/config/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

from django.core.wsgi import get_wsgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")

application = get_wsgi_application()
2 changes: 1 addition & 1 deletion core/isort.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
known_first_party = apps,config
skip_glob = **/migrations/*.py
skip_glob = **/migrations/*.py
4 changes: 2 additions & 2 deletions core/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
Expand All @@ -18,5 +18,5 @@ def main():
execute_from_command_line(sys.argv)


if __name__ == '__main__':
if __name__ == "__main__":
main()
2 changes: 1 addition & 1 deletion core/mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ namespace_packages = True
ignore_errors = True

[mypy-tests.*]
disallow_untyped_defs = False
disallow_untyped_defs = False
2 changes: 1 addition & 1 deletion core/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ adopts = --ds=config.settings --reuse-db -p no:warnings
python_files = tests.py test_*.py
python_classes = Test
filterwarnings =
ignore:.*U.*mode is deprecated:DeprecationWarning
ignore:.*U.*mode is deprecated:DeprecationWarning
40 changes: 19 additions & 21 deletions frontend/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
{
"env": {
"browser": true,
"es2020": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"react-refresh"
],
"rules": {
"react-refresh/only-export-components": "warn",
"import/no-unused-modules": 0
}
"env": {
"browser": true,
"es2020": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["react-refresh"],
"rules": {
"react-refresh/only-export-components": "warn",
"import/no-unused-modules": 0
}
}
2 changes: 1 addition & 1 deletion frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ psd
thumb
sketch

package-lock.json
package-lock.json
2 changes: 1 addition & 1 deletion frontend/.prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
"singleQuote": true,
"tabWidth": 4,
"trailingComma": "none"
}
}
20 changes: 10 additions & 10 deletions frontend/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading

0 comments on commit 12f7641

Please sign in to comment.