typing和防炸

This commit is contained in:
Windpicker-owo
2025-09-03 21:36:22 +08:00
parent 51aad4f952
commit a20dbbdfcb
3 changed files with 4 additions and 4 deletions

View File

@@ -80,8 +80,8 @@ def get_key_comment(toml_table, key):
return item.trivia.comment
if hasattr(toml_table, "keys"):
for k in toml_table.keys():
if isinstance(k, KeyType) and k.key == key: # type: ignore
return k.trivia.comment # type: ignore
if isinstance(k, KeyType) and k.key == key: # type: ignore
return k.trivia.comment # type: ignore
return None