Skip to content

Commit 85d7521

Browse files
committed
fix black mistake on pyright comment
1 parent d98ff89 commit 85d7521

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/ts_utils/metadata.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,8 @@ def update_metadata(distribution: str, **new_values: object) -> tomlkit.TOMLDocu
362362
raise NoSuchStubError(f"Typeshed has no stubs for {distribution!r}!") from None
363363
data.update(new_values) # pyright: ignore[reportUnknownMemberType] # tomlkit.TOMLDocument.update is partially typed
364364
for key in list(data.keys()):
365-
data[key.replace("_", "-")] = data.pop(
366-
key
367-
) # pyright: ignore[reportUnknownMemberType] # tomlkit.TOMLDocument.pop is partially typed
365+
new_key = key.replace("_", "-") # pyright: ignore[reportUnknownMemberType] # tomlkit.TOMLDocument.keys is partially typed
366+
data[new_key] = data.pop(key) # pyright: ignore[reportUnknownMemberType] # tomlkit.TOMLDocument.pop is partially typed
368367
with path.open("w", encoding="UTF-8") as file:
369368
tomlkit.dump(data, file) # pyright: ignore[reportUnknownMemberType] # tomlkit.dump has partially unknown Mapping type
370369
return data

0 commit comments

Comments
 (0)