refactor: fix lint warnings and remove stale type: ignore comments

This commit is contained in:
Johan Lundberg 2026-02-18 13:08:03 +01:00
parent 8c91edf137
commit 64f8c1936b
No known key found for this signature in database
GPG key ID: A6C152738D03C7D1
5 changed files with 34 additions and 28 deletions

View file

@ -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",

View file

@ -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)