Skip to content

Commit

Permalink
pysen format
Browse files Browse the repository at this point in the history
  • Loading branch information
y-chan committed Nov 19, 2023
1 parent 8658a86 commit 96f30e4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
10 changes: 5 additions & 5 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@

from voicevox_engine import __version__
from voicevox_engine.cancellable_engine import CancellableEngine
from voicevox_engine.library_manager import LibraryManager
from voicevox_engine.engine_manifest import EngineManifestLoader
from voicevox_engine.engine_manifest.EngineManifest import EngineManifest
from voicevox_engine.kana_parser import create_kana, parse_kana
from voicevox_engine.library_manager import LibraryManager
from voicevox_engine.metas.MetasStore import MetasStore, construct_lookup
from voicevox_engine.model import (
AccentPhrase,
Expand Down Expand Up @@ -1247,12 +1247,12 @@ def custom_openapi():
"VvlibManifest"
] = VvlibManifest.schema()
# ref_templateを指定しない場合、definitionsを参照してしまうので、手動で指定する
base_library_info = BaseLibraryInfo.schema(ref_template="#/components/schemas/{model}")
base_library_info = BaseLibraryInfo.schema(
ref_template="#/components/schemas/{model}"
)
# definitionsは既存のモデルを重複して定義するため、不要なので削除
del base_library_info["definitions"]
openapi_schema["components"]["schemas"][
"BaseLibraryInfo"
] = base_library_info
openapi_schema["components"]["schemas"]["BaseLibraryInfo"] = base_library_info
app.openapi_schema = openapi_schema
return openapi_schema

Expand Down
6 changes: 5 additions & 1 deletion voicevox_engine/library_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
from pydantic import ValidationError
from semver.version import Version

from voicevox_engine.model import DownloadableLibraryInfo, InstalledLibraryInfo, VvlibManifest
from voicevox_engine.model import (
DownloadableLibraryInfo,
InstalledLibraryInfo,
VvlibManifest,
)

__all__ = ["LibraryManager"]

Expand Down

0 comments on commit 96f30e4

Please sign in to comment.