Skip to content

Commit

Permalink
Small update
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p committed May 23, 2021
1 parent fbc04e6 commit 42a2fde
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ class Foo:
for item in d.items():
print(item[0])
print(d[item[0]]) # [unnecessary-dict-index-lookup]
item = d
print(d[item[0]]) # This is fine, no warning thrown as it is reassigned
item = (2, "b")
print(d[item[0]]) # This is fine, no warning thrown as key has been reassigned

0 comments on commit 42a2fde

Please sign in to comment.