Skip to content

Commit e625782

Browse files
torrid-fishclaude
andcommitted
style(accent): apply ruff format to api/accent/ + main.py
Pure whitespace — single-line collapse where the joined signature / call fits within ruff's 88-char limit. No semantic change; mypy + ruff check still pass; runtime behavior unaffected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 41ba1a7 commit e625782

4 files changed

Lines changed: 5 additions & 15 deletions

File tree

api/accent/furigana.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
YAHOO_FURIGANA_URL = "https://jlp.yahooapis.jp/FuriganaService/V2/furigana"
1717

1818

19-
async def fetch_furigana(
20-
text: str, client: httpx.AsyncClient
21-
) -> FuriganaResponse:
19+
async def fetch_furigana(text: str, client: httpx.AsyncClient) -> FuriganaResponse:
2220
"""POST `text` to Yahoo Furigana and return a parsed FuriganaResponse.
2321
2422
Non-200 upstream / timeout / malformed-payload all return a

api/accent/pipeline.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
logger = logging.getLogger("api")
2424

2525

26-
async def process_accent_chunk(
27-
text: str, client: httpx.AsyncClient
28-
) -> AccentResponse:
26+
async def process_accent_chunk(text: str, client: httpx.AsyncClient) -> AccentResponse:
2927
"""Run the full MarkAccent pipeline on a single chunk of text."""
3028
try:
3129
query_text = neologdn.normalize(text, tilde="normalize")

api/accent/routes.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ async def mark_furigana(
4949
return await fetch_furigana(request.text, client)
5050

5151

52-
@accent_router.post(
53-
"/MarkAccent/", tags=["MarkAccent"], response_model=AccentResponse
54-
)
52+
@accent_router.post("/MarkAccent/", tags=["MarkAccent"], response_model=AccentResponse)
5553
async def mark_accent(
5654
request: Request,
5755
client: httpx.AsyncClient = Depends(get_http_client),

main.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,8 @@ async def get_api_key(api_key: str = Security(api_key_header)) -> None:
8585

8686

8787
# Include routers from different modules
88-
app.include_router(
89-
accent_router, prefix="/api", dependencies=[Depends(get_api_key)]
90-
)
91-
app.include_router(
92-
furigana_router, prefix="/api", dependencies=[Depends(get_api_key)]
93-
)
88+
app.include_router(accent_router, prefix="/api", dependencies=[Depends(get_api_key)])
89+
app.include_router(furigana_router, prefix="/api", dependencies=[Depends(get_api_key)])
9490
app.include_router(
9591
usage_query.router, prefix="/api", dependencies=[Depends(get_api_key)]
9692
)

0 commit comments

Comments
 (0)