Merge ~cjwatson/launchpad:six-iter-avoid-pyupgrade into launchpad:master
Proposed by
Colin Watson
Status: | Merged |
---|---|
Approved by: | Colin Watson |
Approved revision: | 33fb8d2bd53cdd6a6bfa8182cf5147beb487341e |
Merge reported by: | Otto Co-Pilot |
Merged at revision: | not available |
Proposed branch: | ~cjwatson/launchpad:six-iter-avoid-pyupgrade |
Merge into: | launchpad:master |
Diff against target: |
13 lines (+1/-1) 1 file modified
lib/lp/codehosting/inmemory.py (+1/-1) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ioana Lasc (community) | Approve | ||
Review via email: mp+413389@code.launchpad.net |
Commit message
Adjust ObjectSet.__iter__ to avoid pyupgrade confusion
Description of the change
pyupgrade rewrites `six.itervalues
TypeError: iter() returned non-iterator of type 'dict_values'
Fixing this in pyupgrade seems to be hard as the AST walk doesn't have enough information about ancestor nodes beyond the immediate parent, so just manually fix the one place in Launchpad where this is a problem so that pyupgrade can handle other instances of this pattern mechanically.
To post a comment you must log in.