Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

整理: Settingdataclass へ変更 #1407

Merged
merged 2 commits into from
Jun 19, 2024

Conversation

tarepan
Copy link
Contributor

@tarepan tarepan commented Jun 19, 2024

内容

#1405 に基づき Settingdataclass へ変更するリファクタリングを提案します。

test_setting_invalid_input はもともと過剰なテストであったため削除します。

関連 Issue

part of #1405

@tarepan tarepan requested a review from a team as a code owner June 19, 2024 07:03
@tarepan tarepan requested review from Hiroshiba and removed request for a team June 19, 2024 07:03
Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

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

LGTM!

voicevox_engine/setting/setting_manager.py Show resolved Hide resolved
test/unit/setting/test_setting.py Show resolved Hide resolved
Comment on lines 44 to +47
# Expects
true_setting = {"allow_origin": None, "cors_policy_mode": "all"}
# Outputs
setting = settings.model_dump()
setting = _setting_adapter.dump_python(settings)
Copy link
Member

Choose a reason for hiding this comment

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

true_setting側をSetting構造体にすれば_setting_adapterのimport不要にできるかもですね。
あるいはasdictするか。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍️
#1410 にて改善します。

@Hiroshiba Hiroshiba merged commit f43f696 into VOICEVOX:master Jun 19, 2024
4 checks passed
@tarepan tarepan deleted the refactor/setting_dataclass branch June 19, 2024 18:29
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.

2 participants