Coverage for src/lexigram/auth/cli/shell.py: 0%

5 statements  

« prev     ^ index     » next       coverage.py v7.15.4, created at 2026-08-25 12:26 +0800

1"""CLI shell context factories for lexigram-auth.""" 

2 

3from __future__ import annotations 

4 

5from typing import TYPE_CHECKING 

6 

7from lexigram.auth.authn.services import AuthenticationService 

8 

9if TYPE_CHECKING: 

10 from lexigram.contracts.core.di import ContainerResolverProtocol 

11 

12 

13async def provide_auth(container: ContainerResolverProtocol) -> AuthenticationService: 

14 """Provide AuthenticationService for interactive shell use. 

15 

16 Args: 

17 container: Booted DI container. 

18 

19 Returns: 

20 The resolved AuthenticationService instance. 

21 """ 

22 return await container.resolve(AuthenticationService)