Module dependencies as static var
Some checks failed
Test before pr merge / test-lint (pull_request) Failing after 6s
Build on push / prepare (push) Successful in 10s
Build on push / query (push) Successful in 19s
Build on push / core (push) Successful in 20s
Build on push / dependency (push) Successful in 17s
Build on push / application (push) Successful in 15s
Build on push / database (push) Successful in 16s
Build on push / mail (push) Successful in 18s
Build on push / translation (push) Successful in 22s
Build on push / auth (push) Successful in 18s
Build on push / api (push) Successful in 17s
Some checks failed
Test before pr merge / test-lint (pull_request) Failing after 6s
Build on push / prepare (push) Successful in 10s
Build on push / query (push) Successful in 19s
Build on push / core (push) Successful in 20s
Build on push / dependency (push) Successful in 17s
Build on push / application (push) Successful in 15s
Build on push / database (push) Successful in 16s
Build on push / mail (push) Successful in 18s
Build on push / translation (push) Successful in 22s
Build on push / auth (push) Successful in 18s
Build on push / api (push) Successful in 17s
This commit is contained in:
@@ -1,21 +1,6 @@
|
||||
from cpl.dependency import ServiceCollection as _ServiceCollection
|
||||
from .abc.email_client_abc import EMailClientABC
|
||||
from .email_client import EMailClient
|
||||
from .email_client_settings import EMailClientSettings
|
||||
from .email_model import EMail
|
||||
from .mail_module import MailModule
|
||||
from .logger import MailLogger
|
||||
|
||||
|
||||
def add_mail(collection: _ServiceCollection):
|
||||
from cpl.core.console import Console
|
||||
from cpl.core.log import LoggerABC
|
||||
|
||||
try:
|
||||
collection.add_singleton(EMailClientABC, EMailClient)
|
||||
collection.add_transient(LoggerABC, MailLogger)
|
||||
except ImportError as e:
|
||||
Console.error("cpl-translation is not installed", str(e))
|
||||
|
||||
|
||||
_ServiceCollection.with_module(add_mail, __name__)
|
||||
from .mail_module import MailModule
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
from cpl.dependency import ServiceCollection
|
||||
from cpl.dependency.service_collection import ServiceCollection
|
||||
from cpl.dependency.module import Module, TModule
|
||||
|
||||
|
||||
class MailModule(Module):
|
||||
@staticmethod
|
||||
def dependencies() -> list[TModule]:
|
||||
return []
|
||||
dependencies = []
|
||||
|
||||
@staticmethod
|
||||
def register(collection: ServiceCollection):
|
||||
|
||||
Reference in New Issue
Block a user