Skip to content

fix: pydantic error in accent_marker and imporve logging - #37

Merged
minto1226 merged 17 commits into
mainfrom
fix/number-marker
Dec 27, 2025
Merged

fix: pydantic error in accent_marker and imporve logging#37
minto1226 merged 17 commits into
mainfrom
fix/number-marker

Conversation

@minto1226

@minto1226 minto1226 commented Dec 12, 2025

Copy link
Copy Markdown
Collaborator

目的

修改furigana_results至正確的datatype,以及修改print成logger

方法/實作說明

  1. mark_furigana()改為直接return Response object.
  2. 將內部 print 更換成 logger
  3. Error時result會return None而不是空list

關聯 Issue

fix #36

fix: fix reading from yahoo_subword

heap: adjustment yahoo_subword's type hint

chore: change furigana_results's data type
@minto1226
minto1226 requested a review from wade00754 as a code owner December 12, 2025 13:00
@minto1226 minto1226 changed the title Fix/number marker chore: change print to logger and change furigana_results's data type Dec 12, 2025
@minto1226
minto1226 force-pushed the fix/number-marker branch 3 times, most recently from f85747f to ef26227 Compare December 12, 2025 14:36
heat: fix httpx problem

chore: fix ruff problem

chore: fix ruff problem

chore: fix ruff problem
wade00754
wade00754 previously approved these changes Dec 13, 2025

@wade00754 wade00754 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. But please take the recommendations into consideration.

Comment thread api/accent_marker.py Outdated
Comment thread api/accent_marker.py
@minto1226
minto1226 force-pushed the fix/number-marker branch 2 times, most recently from 82bdd64 to 95d06fd Compare December 14, 2025 07:32
chore: change print to logger

fix: fix ruff problem

fix: fix ruff problem

fix: fix ruff problem
chore: change print to logger

@wade00754 wade00754 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take a look at the comments to do futher changes.

Comment thread api/furigana_marker.py Outdated
Comment thread api/furigana_marker.py Outdated
Comment thread api/furigana_marker.py Outdated
Comment thread api/furigana_marker.py
@wade00754 wade00754 changed the title chore: change print to logger and change furigana_results's data type fix: pydantic error in accent_marker Dec 25, 2025
@wade00754 wade00754 changed the title fix: pydantic error in accent_marker fix: pydantic error in accent_marker and imporve logging Dec 25, 2025
@github-actions

Copy link
Copy Markdown

🛡️ PR Quality Check Summary

PR Title: Passed (Length: 56/75, Format: OK). fix: pydantic error in accent_marker and imporve logging
Branch Name: Follows naming convention (fix/number-marker)
Commit Messages: All 17 commit(s) passed (Length, Format, Case)
Conflicts: No merge conflict markers found
Python Quality: All checks passed.


🎉 All checks passed!

@wade00754 wade00754 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have found that FastAPI can use the Pydantic model as respone so that we can return it directly.

@minto1226
minto1226 added this pull request to the merge queue Dec 27, 2025
Merged via the queue into main with commit ad5a8d2 Dec 27, 2025
48 checks passed
@minto1226
minto1226 deleted the fix/number-marker branch December 27, 2025 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pydantic issue

2 participants