Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: PyCQA/flake8-bugbear
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 24.4.21
Choose a base ref
...
head repository: PyCQA/flake8-bugbear
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 24.4.26
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on Apr 26, 2024

  1. 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
    mimre25 authored Apr 26, 2024
    Configuration menu
    Copy the full SHA
    b4986aa View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8d524af View commit details
    Browse the repository at this point in the history
Loading