-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(b909): Fix false positive affecting containers of mutables (#469)
* fix(b909): Fix false positive affecting containers of mutables The false positives occurred when trying to edit a dictionary while iterating over a list of dictionaries: ``` lst: list[dict] = [{}, {}, {}] for dic in lst: dic["key"] = False # was false positive - fixed now ``` * fix(b909): Allow mutation of dict[key] form These changes allow the following: ``` some_dict = {"foo": "bar"} for key in some_dict: some_dict[key] = 3 # no error (previously error'd) ``` * fix(b909): Fix python 3.8 incompatibility Turns out, that the slice type was changed in python 3.9. > Changed in version 3.9: Simple indices are represented by their value, > extended slices are represented as tuples. from https://docs.python.org/3/library/ast.html#module-ast
- Loading branch information
Showing
2 changed files
with
73 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters