From 9227e9c3f347d59a35622ef7512014d5a128f8e5 Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Wed, 29 Sep 2021 17:00:36 -0400 Subject: [PATCH] Update quotes in multiple containers example --- .../example/__main__.py | 4 ++-- .../example/containers.py | 2 +- .../example/services.py | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/miniapps/application-multiple-containers/example/__main__.py b/examples/miniapps/application-multiple-containers/example/__main__.py index f932b1ed..08331eeb 100644 --- a/examples/miniapps/application-multiple-containers/example/__main__.py +++ b/examples/miniapps/application-multiple-containers/example/__main__.py @@ -22,9 +22,9 @@ def main( photo_service.upload_photo(user, photo) -if __name__ == '__main__': +if __name__ == "__main__": application = Application() - application.config.from_yaml('config.yml') + application.config.from_yaml("config.yml") application.core.init_resources() application.wire(modules=[__name__]) diff --git a/examples/miniapps/application-multiple-containers/example/containers.py b/examples/miniapps/application-multiple-containers/example/containers.py index df56129c..5049df4a 100644 --- a/examples/miniapps/application-multiple-containers/example/containers.py +++ b/examples/miniapps/application-multiple-containers/example/containers.py @@ -30,7 +30,7 @@ class Gateways(containers.DeclarativeContainer): s3_client = providers.Singleton( boto3.client, - service_name='s3', + service_name="s3", aws_access_key_id=config.aws.access_key_id, aws_secret_access_key=config.aws.secret_access_key, ) diff --git a/examples/miniapps/application-multiple-containers/example/services.py b/examples/miniapps/application-multiple-containers/example/services.py index 338888e3..7f2013c3 100644 --- a/examples/miniapps/application-multiple-containers/example/services.py +++ b/examples/miniapps/application-multiple-containers/example/services.py @@ -11,7 +11,7 @@ class BaseService: def __init__(self) -> None: self.logger = logging.getLogger( - f'{__name__}.{self.__class__.__name__}', + f"{__name__}.{self.__class__.__name__}", ) @@ -22,8 +22,8 @@ class UserService(BaseService): super().__init__() def get_user(self, email: str) -> Dict[str, str]: - self.logger.debug('User %s has been found in database', email) - return {'email': email, 'password_hash': '...'} + self.logger.debug("User %s has been found in database", email) + return {"email": email, "password_hash": "..."} class AuthService(BaseService): @@ -36,8 +36,8 @@ class AuthService(BaseService): def authenticate(self, user: Dict[str, str], password: str) -> None: assert password is not None self.logger.debug( - 'User %s has been successfully authenticated', - user['email'], + "User %s has been successfully authenticated", + user["email"], ) @@ -50,7 +50,7 @@ class PhotoService(BaseService): def upload_photo(self, user: Dict[str, str], photo_path: str) -> None: self.logger.debug( - 'Photo %s has been successfully uploaded by user %s', + "Photo %s has been successfully uploaded by user %s", photo_path, - user['email'], + user["email"], )