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

Conversation

Projects
None yet
3 participants
@Eric-Arellano
Copy link
Contributor

Eric-Arellano commented Jul 20, 2018

Part of #6062

@stuhood
Copy link
Member

stuhood left a comment

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()):

This comment has been minimized.

@wisechengyi

wisechengyi Jul 20, 2018

Contributor

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

This comment has been minimized.

@Eric-Arellano

Eric-Arellano Jul 21, 2018

Contributor

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!

@wisechengyi
Copy link
Contributor

wisechengyi left a comment

Thank you!

@stuhood stuhood merged commit 6f9d4c9 into pantsbuild:master Jul 21, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Eric-Arellano Eric-Arellano deleted the Eric-Arellano:port-plugins branch Jul 22, 2018

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