-
-
Notifications
You must be signed in to change notification settings - Fork 649
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
Port pants-plugins #6209
Port pants-plugins #6209
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -234,7 +234,7 @@ def ensure_page_headings_linkable(soup): | |||
|
|||
def link_pantsrefs(soups, precomputed): | |||
"""Transorm soups: <a pantsref="foo"> becomes <a href="../foo_page.html#foo">""" | |||
for (page, soup) in soups.items(): | |||
for (page, soup) in list(soups.items()): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should still work without changes, right?
$ python3
Python 3.6.1 (v3.6.1:69c0db5050, Mar 21 2017, 01:21:04)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> {1:2,3:4}.items()
dict_items([(1, 2), (3, 4)])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should! I missed this and will fix when I get a chance.
The futurize script is extra conservative because sometimes you do need to wrap in a list, eg when accessing a specific index. Here, the view is preferred and far more performant.
Thanks for catching this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Part of #6062