Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
292 changes: 185 additions & 107 deletions poetry.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ asyncpg = "^0.30.0"
aiosqlite = "^0.21.0"
aioboto3 = "^13.4.0"
pytest-asyncio = "^0.25.3"
black = "^26.1.0"


[build-system]
Expand Down
14 changes: 8 additions & 6 deletions src/config/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ def get_settings() -> BaseAppSettings:
return Settings()


def get_jwt_auth_manager(settings: BaseAppSettings = Depends(get_settings)) -> JWTAuthManagerInterface:
def get_jwt_auth_manager(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The positional-only marker (/) at the start of the parameter list is unnecessary here and may confuse readers. Removing it will keep the signature simpler: def get_jwt_auth_manager(settings: BaseAppSettings = Depends(get_settings)) -> JWTAuthManagerInterface:

settings: BaseAppSettings = Depends(get_settings),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: the settings parameter uses Depends(get_settings) correctly. No change required, just confirming this matches the dependency injection requirements.

) -> JWTAuthManagerInterface:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure the constructor parameters passed to JWTAuthManager match its actual initializer. If JWTAuthManager expects different keyword names (for example secret_access_key vs secret_key_access) a TypeError will occur at runtime — verify the names secret_key_access, secret_key_refresh, and algorithm are correct.

"""
Create and return a JWT authentication manager instance.

Expand All @@ -45,12 +47,12 @@ def get_jwt_auth_manager(settings: BaseAppSettings = Depends(get_settings)) -> J
return JWTAuthManager(
secret_key_access=settings.SECRET_KEY_ACCESS,
secret_key_refresh=settings.SECRET_KEY_REFRESH,
algorithm=settings.JWT_SIGNING_ALGORITHM
algorithm=settings.JWT_SIGNING_ALGORITHM,
)


def get_accounts_email_notificator(
settings: BaseAppSettings = Depends(get_settings)
settings: BaseAppSettings = Depends(get_settings),
) -> EmailSenderInterface:
"""
Retrieve an instance of the EmailSenderInterface configured with the application settings.
Expand All @@ -76,12 +78,12 @@ def get_accounts_email_notificator(
activation_email_template_name=settings.ACTIVATION_EMAIL_TEMPLATE_NAME,
activation_complete_email_template_name=settings.ACTIVATION_COMPLETE_EMAIL_TEMPLATE_NAME,
password_email_template_name=settings.PASSWORD_RESET_TEMPLATE_NAME,
password_complete_email_template_name=settings.PASSWORD_RESET_COMPLETE_TEMPLATE_NAME
password_complete_email_template_name=settings.PASSWORD_RESET_COMPLETE_TEMPLATE_NAME,
)


def get_s3_storage_client(
settings: BaseAppSettings = Depends(get_settings)
settings: BaseAppSettings = Depends(get_settings),
) -> S3StorageInterface:
"""
Retrieve an instance of the S3StorageInterface configured with the application settings.
Expand All @@ -101,5 +103,5 @@ def get_s3_storage_client(
endpoint_url=settings.S3_STORAGE_ENDPOINT,
access_key=settings.S3_STORAGE_ACCESS_KEY,
secret_key=settings.S3_STORAGE_SECRET_KEY,
bucket_name=settings.S3_BUCKET_NAME
bucket_name=settings.S3_BUCKET_NAME,
)
Loading