refactor: fix lint warnings and remove stale type: ignore comments
This commit is contained in:
parent
8c91edf137
commit
64f8c1936b
5 changed files with 34 additions and 28 deletions
|
|
@ -91,7 +91,7 @@ async def lifespan(app: FastAPI) -> AsyncIterator[None]:
|
|||
|
||||
def create_app(settings: Settings | None = None) -> FastAPI:
|
||||
if settings is None:
|
||||
settings = Settings() # type: ignore[call-arg]
|
||||
settings = Settings()
|
||||
|
||||
app = FastAPI(
|
||||
title="Porchlight",
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ def create_invite(
|
|||
note: Annotated[str | None, typer.Option(help="Optional note stored with the link")] = None,
|
||||
) -> None:
|
||||
"""Generate a magic link registration URL for a new user."""
|
||||
settings = Settings() # type: ignore[call-arg]
|
||||
settings = Settings()
|
||||
effective_ttl = ttl if ttl is not None else settings.invite_ttl
|
||||
url = asyncio.run(_create_invite(settings, username, effective_ttl, note))
|
||||
typer.echo(url)
|
||||
|
|
@ -64,7 +64,7 @@ def initial_admin(
|
|||
group: Annotated[list[str] | None, typer.Option(help="Groups to assign (repeatable)")] = None,
|
||||
) -> None:
|
||||
"""Bootstrap the first admin user with a registration link."""
|
||||
settings = Settings() # type: ignore[call-arg]
|
||||
settings = Settings()
|
||||
groups = group if group is not None else ["admin", "users"]
|
||||
url = asyncio.run(_initial_admin(settings, username, groups))
|
||||
typer.echo(url)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue