Skip to content

Commit 9afa2a6

Browse files
stephenmcgruermoz-wptsync-bot
authored andcommitted
Bug 1638892 [wpt PR 23669] - Rename variable to avoid mypy type error, a=testonly
Automatic update from web-platform-tests Rename variable to avoid mypy type error (#23669) Reusing variables can cause a mypy type error (python/mypy#1174). This previously went unnoticed because the previous and current use of `key` was `str`, but in web-platform-tests/wpt#23644 the previous use was retyped to `Text` and as such caused a unicode-vs-str type error in mypy. -- wpt-commits: 7b9a66f8a9cf68bbe220473f9eff0e652998c072 wpt-pr: 23669
1 parent 6a0d040 commit 9afa2a6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

testing/web-platform/tests/tools/manifest/sourcefile.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -989,9 +989,9 @@ def manifest_items(self):
989989

990990
if drop_cached and "__cached_properties__" in self.__dict__:
991991
cached_properties = self.__dict__["__cached_properties__"]
992-
for key in cached_properties:
993-
if str(key) in self.__dict__:
994-
del self.__dict__[str(key)]
992+
for prop in cached_properties:
993+
if prop in self.__dict__:
994+
del self.__dict__[prop]
995995
del self.__dict__["__cached_properties__"]
996996

997997
return rv

0 commit comments

Comments
 (0)