From c3bbbff2f2eb2f18f986a3f28f77c706f5e83a82 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Sun, 17 Sep 2023 09:50:51 +0300 Subject: [PATCH] Fix import linter (#71) --- .importlinter | 4 ++-- .../identity/{intrastructure => infrastructure}/__init__.py | 0 .../{intrastructure => infrastructure}/django/__init__.py | 0 .../{intrastructure => infrastructure}/django/decorators.py | 0 .../{intrastructure => infrastructure}/django/forms.py | 0 .../{intrastructure => infrastructure}/services/__init__.py | 0 .../services/placeholder.py | 0 server/apps/identity/logic/usecases/user_create_new.py | 2 +- server/apps/identity/logic/usecases/user_update.py | 2 +- server/apps/identity/views/login.py | 4 ++-- server/apps/identity/views/user.py | 2 +- .../pictures/{intrastructure => infrastructure}/__init__.py | 0 .../{intrastructure => infrastructure}/django/__init__.py | 0 .../{intrastructure => infrastructure}/django/forms.py | 0 .../{intrastructure => infrastructure}/services/__init__.py | 0 .../services/placeholder.py | 0 server/apps/pictures/logic/usecases/pictures_fetch.py | 2 +- server/apps/pictures/views.py | 2 +- 18 files changed, 9 insertions(+), 9 deletions(-) rename server/apps/identity/{intrastructure => infrastructure}/__init__.py (100%) rename server/apps/identity/{intrastructure => infrastructure}/django/__init__.py (100%) rename server/apps/identity/{intrastructure => infrastructure}/django/decorators.py (100%) rename server/apps/identity/{intrastructure => infrastructure}/django/forms.py (100%) rename server/apps/identity/{intrastructure => infrastructure}/services/__init__.py (100%) rename server/apps/identity/{intrastructure => infrastructure}/services/placeholder.py (100%) rename server/apps/pictures/{intrastructure => infrastructure}/__init__.py (100%) rename server/apps/pictures/{intrastructure => infrastructure}/django/__init__.py (100%) rename server/apps/pictures/{intrastructure => infrastructure}/django/forms.py (100%) rename server/apps/pictures/{intrastructure => infrastructure}/services/__init__.py (100%) rename server/apps/pictures/{intrastructure => infrastructure}/services/placeholder.py (100%) diff --git a/.importlinter b/.importlinter index 90ae85f7..e4cb4e70 100644 --- a/.importlinter +++ b/.importlinter @@ -16,10 +16,10 @@ containers = layers = (urls) | (admin) (views) - (infrastructure) + (container) (logic) + (infrastructure) (models) - (container) [importlinter:contract:apps-independence] diff --git a/server/apps/identity/intrastructure/__init__.py b/server/apps/identity/infrastructure/__init__.py similarity index 100% rename from server/apps/identity/intrastructure/__init__.py rename to server/apps/identity/infrastructure/__init__.py diff --git a/server/apps/identity/intrastructure/django/__init__.py b/server/apps/identity/infrastructure/django/__init__.py similarity index 100% rename from server/apps/identity/intrastructure/django/__init__.py rename to server/apps/identity/infrastructure/django/__init__.py diff --git a/server/apps/identity/intrastructure/django/decorators.py b/server/apps/identity/infrastructure/django/decorators.py similarity index 100% rename from server/apps/identity/intrastructure/django/decorators.py rename to server/apps/identity/infrastructure/django/decorators.py diff --git a/server/apps/identity/intrastructure/django/forms.py b/server/apps/identity/infrastructure/django/forms.py similarity index 100% rename from server/apps/identity/intrastructure/django/forms.py rename to server/apps/identity/infrastructure/django/forms.py diff --git a/server/apps/identity/intrastructure/services/__init__.py b/server/apps/identity/infrastructure/services/__init__.py similarity index 100% rename from server/apps/identity/intrastructure/services/__init__.py rename to server/apps/identity/infrastructure/services/__init__.py diff --git a/server/apps/identity/intrastructure/services/placeholder.py b/server/apps/identity/infrastructure/services/placeholder.py similarity index 100% rename from server/apps/identity/intrastructure/services/placeholder.py rename to server/apps/identity/infrastructure/services/placeholder.py diff --git a/server/apps/identity/logic/usecases/user_create_new.py b/server/apps/identity/logic/usecases/user_create_new.py index 9aac50e8..8ef5d279 100644 --- a/server/apps/identity/logic/usecases/user_create_new.py +++ b/server/apps/identity/logic/usecases/user_create_new.py @@ -2,7 +2,7 @@ import attr -from server.apps.identity.intrastructure.services import placeholder +from server.apps.identity.infrastructure.services import placeholder from server.apps.identity.models import User from server.common.django.types import Settings diff --git a/server/apps/identity/logic/usecases/user_update.py b/server/apps/identity/logic/usecases/user_update.py index 8100540f..348ed60f 100644 --- a/server/apps/identity/logic/usecases/user_update.py +++ b/server/apps/identity/logic/usecases/user_update.py @@ -2,7 +2,7 @@ import attr -from server.apps.identity.intrastructure.services import placeholder +from server.apps.identity.infrastructure.services import placeholder from server.apps.identity.models import User from server.common.django.types import Settings diff --git a/server/apps/identity/views/login.py b/server/apps/identity/views/login.py index 29d8292c..61ca0931 100644 --- a/server/apps/identity/views/login.py +++ b/server/apps/identity/views/login.py @@ -10,10 +10,10 @@ from ratelimit.mixins import RatelimitMixin from server.apps.identity.container import container -from server.apps.identity.intrastructure.django.decorators import ( +from server.apps.identity.infrastructure.django.decorators import ( redirect_logged_in_users, ) -from server.apps.identity.intrastructure.django.forms import ( +from server.apps.identity.infrastructure.django.forms import ( AuthenticationForm, RegistrationForm, ) diff --git a/server/apps/identity/views/user.py b/server/apps/identity/views/user.py index c4c19d16..fb9ddc19 100644 --- a/server/apps/identity/views/user.py +++ b/server/apps/identity/views/user.py @@ -10,7 +10,7 @@ from ratelimit.mixins import RatelimitMixin from server.apps.identity.container import container -from server.apps.identity.intrastructure.django.forms import UserUpdateForm +from server.apps.identity.infrastructure.django.forms import UserUpdateForm from server.apps.identity.logic.usecases.user_update import UserUpdate from server.apps.identity.models import User from server.common.django.decorators import dispatch_decorator diff --git a/server/apps/pictures/intrastructure/__init__.py b/server/apps/pictures/infrastructure/__init__.py similarity index 100% rename from server/apps/pictures/intrastructure/__init__.py rename to server/apps/pictures/infrastructure/__init__.py diff --git a/server/apps/pictures/intrastructure/django/__init__.py b/server/apps/pictures/infrastructure/django/__init__.py similarity index 100% rename from server/apps/pictures/intrastructure/django/__init__.py rename to server/apps/pictures/infrastructure/django/__init__.py diff --git a/server/apps/pictures/intrastructure/django/forms.py b/server/apps/pictures/infrastructure/django/forms.py similarity index 100% rename from server/apps/pictures/intrastructure/django/forms.py rename to server/apps/pictures/infrastructure/django/forms.py diff --git a/server/apps/pictures/intrastructure/services/__init__.py b/server/apps/pictures/infrastructure/services/__init__.py similarity index 100% rename from server/apps/pictures/intrastructure/services/__init__.py rename to server/apps/pictures/infrastructure/services/__init__.py diff --git a/server/apps/pictures/intrastructure/services/placeholder.py b/server/apps/pictures/infrastructure/services/placeholder.py similarity index 100% rename from server/apps/pictures/intrastructure/services/placeholder.py rename to server/apps/pictures/infrastructure/services/placeholder.py diff --git a/server/apps/pictures/logic/usecases/pictures_fetch.py b/server/apps/pictures/logic/usecases/pictures_fetch.py index 6348a4e2..0861e72d 100644 --- a/server/apps/pictures/logic/usecases/pictures_fetch.py +++ b/server/apps/pictures/logic/usecases/pictures_fetch.py @@ -2,7 +2,7 @@ import attr -from server.apps.pictures.intrastructure.services import placeholder +from server.apps.pictures.infrastructure.services import placeholder from server.common.django.types import Settings diff --git a/server/apps/pictures/views.py b/server/apps/pictures/views.py index c698fccb..eb75a793 100644 --- a/server/apps/pictures/views.py +++ b/server/apps/pictures/views.py @@ -8,7 +8,7 @@ from django.views.generic import CreateView, ListView, TemplateView from server.apps.pictures.container import container -from server.apps.pictures.intrastructure.django.forms import FavouritesForm +from server.apps.pictures.infrastructure.django.forms import FavouritesForm from server.apps.pictures.logic.usecases import favourites_list, pictures_fetch from server.apps.pictures.models import FavouritePicture from server.common.django.decorators import dispatch_decorator