Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/smyth/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import logging.config
import os
from enum import Enum
from typing import Annotated, Optional
from typing import Annotated

import typer
import uvicorn
Expand Down Expand Up @@ -36,10 +36,10 @@ def run(
), # noqa: UP007
] = "smyth.server.app:create_app",
factory: Annotated[bool, typer.Option(help="Use factory for app creation")] = True,
host: Annotated[Optional[str], typer.Option()] = config.host, # noqa: UP007
port: Annotated[Optional[int], typer.Option()] = config.port, # noqa: UP007
host: Annotated[str | None, typer.Option()] = config.host, # noqa: UP007
port: Annotated[int | None, typer.Option()] = config.port, # noqa: UP007
log_level: Annotated[
Optional[LogLevel], # noqa: UP007
LogLevel | None, # noqa: UP007
typer.Option(
help=(
"Override the log level specified in the configuration, "
Expand Down
2 changes: 1 addition & 1 deletion src/smyth/server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(self, smyth: Smyth, smyth_path_prefix: str, *args: Any, **kwargs: A
self.add_route(
"/{path:path}",
lambda_invoker_endpoint,
methods=["GET", "POST", "PUT", "DELETE"],
methods=["GET", "POST", "PUT", "DELETE", "OPTIONS"],
)


Expand Down
2 changes: 1 addition & 1 deletion src/smyth/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def create_header_row(self, record: LogRecord) -> RenderableType:
process_name = record.processName

return Text.from_markup(
f"{issuer}:" f"[bold]{process_name}[/]",
f"{issuer}:[bold]{process_name}[/]",
style="log.process",
)

Expand Down
2 changes: 1 addition & 1 deletion tests/server/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def test_smyth_starlette(mocker):
Route(
"/{path:path}",
lambda_invoker_endpoint,
methods=["DELETE", "GET", "HEAD", "POST", "PUT"],
methods=["DELETE", "GET", "HEAD", "POST", "PUT", "OPTIONS"],
),
]

Expand Down
Loading