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

Port pants-plugins #6209

Merged
merged 2 commits into from
Jul 21, 2018
Merged

Port pants-plugins #6209

merged 2 commits into from
Jul 21, 2018

Conversation

Eric-Arellano
Copy link
Contributor

Part of #6062

Copy link
Member

@stuhood stuhood left a 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()):
Copy link
Contributor

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)])

Copy link
Contributor Author

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!

Copy link
Contributor

@wisechengyi wisechengyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@stuhood stuhood merged commit 6f9d4c9 into pantsbuild:master Jul 21, 2018
@Eric-Arellano Eric-Arellano deleted the port-plugins branch July 22, 2018 12:57
CMLivingston pushed a commit to CMLivingston/pants that referenced this pull request Aug 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants