chore: プログレスバーを出すように

pull/109/head
yupix 8 months ago
parent 29f565e9aa
commit 7e2eb932c9
No known key found for this signature in database
GPG Key ID: 2FF705F5C56D9C06

@ -5,6 +5,8 @@ import sys
from type import OpenAPI
from typing import Any, Literal, TypedDict
import tqdm
sys.path.append("../")
from mipac.utils.util import COLORS # noqa: E402
@ -51,7 +53,7 @@ with open('./datas/endpoints.json', mode='r', encoding='utf-8') as f:
_endpoints: IData = copy.deepcopy(endpoints)
# パスに関する情報を更新する
for path in api['paths']:
for path in tqdm.tqdm(api['paths']):
old_data = endpoints["endpoints"]['support'].get(path, None)
current_request_body_hash = get_sha256_hash(api['paths'][path]['post'].get('requestBody', {}))
current_response_body_hash = get_sha256_hash(api['paths'][path]['post'].get('responses', {}))
@ -82,20 +84,20 @@ for path in api['paths']:
# Misskeyから削除されたエンドポイントをremovedに移動する
for path in _endpoints["endpoints"]['support']:
for path in tqdm.tqdm(_endpoints["endpoints"]['support']):
endpoints["endpoints"]['removed'][path] = _endpoints["endpoints"]['support'][path]
# Misskeyから削除された場合はRemovedFromMisskeyにする
endpoints["endpoints"]['removed'][path]['status'] = "RemovedFromMisskey"
del endpoints["endpoints"]['support'][path]
# MiPACからの削除が完了した場合はremovedから削除する
for path in _endpoints["endpoints"]['removed']:
for path in tqdm.tqdm(_endpoints["endpoints"]['removed']):
if endpoints["endpoints"]['removed'][path]['status'] == "Removed":
del endpoints["endpoints"]['removed'][path]
continue
# スキーマに関する情報を更新する
for schema in api['components']['schemas']:
for schema in tqdm.tqdm(api['components']['schemas']):
try:
del _endpoints["schemas"][schema]
except KeyError:

Loading…
Cancel
Save