Skip to content

Commit

Permalink
Bug 1638892 [wpt PR 23669] - Rename variable to avoid mypy type error…
Browse files Browse the repository at this point in the history
…, 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
  • Loading branch information
stephenmcgruer authored and moz-wptsync-bot committed May 27, 2020
1 parent a180d06 commit dd62aee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions testing/web-platform/tests/tools/manifest/sourcefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -989,9 +989,9 @@ def manifest_items(self):

if drop_cached and "__cached_properties__" in self.__dict__:
cached_properties = self.__dict__["__cached_properties__"]
for key in cached_properties:
if str(key) in self.__dict__:
del self.__dict__[str(key)]
for prop in cached_properties:
if prop in self.__dict__:
del self.__dict__[prop]
del self.__dict__["__cached_properties__"]

return rv

0 comments on commit dd62aee

Please sign in to comment.