Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix false positive when testing for-loops for unbalanced unpacking (W0644) #8892

Merged

Commits on Jul 27, 2023

  1. When checking for loops for unbalanced dict unpacking, compare the nu…

    …mber of targets to the size of each value, instead of the number of values, since the for loop will iterate the values and unpack each in turn onto the targets.
    Neowizard committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    519c09a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f028970 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    877afaf View commit details
    Browse the repository at this point in the history
  4. Fixed support for Dict values when checking for unbalanced-dict-unpac…

    …king. The original implementation would use `NodeNG.get_children()` which would return the AST subnodes for the Dict (i.e. all the keys and values), and not just the keys.
    Neowizard committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    d8cbf40 View commit details
    Browse the repository at this point in the history
  5. Added support for star-unpacking when checking for unbalanced-dict-un…

    …packing.
    
    Star unpacking requires there to be at least as many values to unpack as targets, so the unpacking is considered valid if the number of targets equal the number of values or if it's a star-unpacking with at least as many values as targets
    Neowizard committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    4c2cd8a View commit details
    Browse the repository at this point in the history
  6. Merge branch 'false-positive-unbalanced-dict-unpacking' of https://gi…

    …thub.com/Neowizard/pylint into false-positive-unbalanced-dict-unpacking
    Neowizard committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    c10f299 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    cfc4907 View commit details
    Browse the repository at this point in the history
  8. Added test case to cover subscripts/splices when checking for unbalan…

    …ced-dict-unpacking to complete test code coverage
    Neowizard committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    31bdca5 View commit details
    Browse the repository at this point in the history
  9. Regenerated docs

    Neowizard committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    71e54a8 View commit details
    Browse the repository at this point in the history
  10. Merge branch 'false-positive-unbalanced-dict-unpacking' of https://gi…

    …thub.com/Neowizard/pylint into false-positive-unbalanced-dict-unpacking
    Neowizard committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    4892c97 View commit details
    Browse the repository at this point in the history

Commits on Jul 30, 2023

  1. Fixed but in how we test the length of a splice - was missing `Const.…

    …value`. Also refactored the code a bit for readability
    Neowizard committed Jul 30, 2023
    Configuration menu
    Copy the full SHA
    e21bc39 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    181f07d View commit details
    Browse the repository at this point in the history
  3. Added news fragment

    Neowizard committed Jul 30, 2023
    Configuration menu
    Copy the full SHA
    07558f3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e29fea9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    de1206d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ed8d7d1 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    72eb2e6 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    bc98d03 View commit details
    Browse the repository at this point in the history
  9. Merge branch 'false-positive-unbalanced-dict-unpacking' of https://gi…

    …thub.com/Neowizard/pylint into false-positive-unbalanced-dict-unpacking
    Neowizard committed Jul 30, 2023
    Configuration menu
    Copy the full SHA
    8ac683e View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    28ad6fb View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    3151e25 View commit details
    Browse the repository at this point in the history
  12. Merge branch 'false-positive-unbalanced-dict-unpacking' of https://gi…

    …thub.com/Neowizard/pylint into false-positive-unbalanced-dict-unpacking
    Neowizard committed Jul 30, 2023
    Configuration menu
    Copy the full SHA
    c98b889 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    197746c View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2023

  1. Configuration menu
    Copy the full SHA
    a0471d4 View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2023

  1. Configuration menu
    Copy the full SHA
    bc65c3c View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2023

  1. Configuration menu
    Copy the full SHA
    f721da9 View commit details
    Browse the repository at this point in the history
  2. Detect incidents of missing call to items during unbalanced-dict-un…

    …packing check, so we can report just the more specific missing `items` calls.
    Neowizard committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    49888a1 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2023

  1. Configuration menu
    Copy the full SHA
    51bf4bd View commit details
    Browse the repository at this point in the history
  2. Fix spelling

    Pierre-Sassoulas authored Aug 15, 2023
    Configuration menu
    Copy the full SHA
    f63349a View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2023

  1. Configuration menu
    Copy the full SHA
    766d13b View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2023

  1. Configuration menu
    Copy the full SHA
    bd3044d View commit details
    Browse the repository at this point in the history
  2. Explicitly state the cases handled by the end of visit_for in `vari…

    …ables.py`.
    
    Also, noted in unit-test that unbalanced-dict-unpacking is supressed for cases of dict-items-missing-iter
    Neowizard committed Aug 30, 2023
    Configuration menu
    Copy the full SHA
    f6becf1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3989730 View commit details
    Browse the repository at this point in the history
  4. Refactored conditions for readability when detecting ubnalanced-dict-…

    …unpacking
    
    Co-authored-by: Mark Byrne <[email protected]>
    Neowizard and mbyrnepr2 authored Aug 30, 2023
    Configuration menu
    Copy the full SHA
    fb2f253 View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2023

  1. Configuration menu
    Copy the full SHA
    0fe5f2e View commit details
    Browse the repository at this point in the history