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

Collection subclasses correctly coerce to bools #7584

Merged
merged 2 commits into from Apr 18, 2019

Conversation

Projects
None yet
5 participants
@illicitonion
Copy link
Contributor

commented Apr 17, 2019

No description provided.

@illicitonion illicitonion requested a review from blorente Apr 17, 2019

@ity

ity approved these changes Apr 17, 2019

@stuhood

This comment has been minimized.

Copy link
Member

commented Apr 17, 2019

Thanks! Fixing some callsites would be welcome too.

@cosmicexplorer
Copy link
Contributor

left a comment

This is a great change! We could consider renaming the field from dependencies at some point, since as you've pointed out that is only true for a small portion of consumers.

return bool(self.dependencies)

def __nonzero__(self):
# For python 2 compatibility.

This comment has been minimized.

Copy link
@Eric-Arellano

Eric-Arellano Apr 18, 2019

Contributor

Would be good to link to #6071 so that we know to remove this in 1.17.x.

This comment has been minimized.

Copy link
@illicitonion

illicitonion Apr 18, 2019

Author Contributor

Done

@illicitonion

This comment has been minimized.

Copy link
Contributor Author

commented Apr 18, 2019

Thanks! Fixing some callsites would be welcome too.

I don't believe any callsites are actually broken right now (but the v2 PR you have open could benefit from this :))

This is a great change! We could consider renaming the field from dependencies at some point, since as you've pointed out that is only true for a small portion of consumers.

Yeah, I was going to wait until Stu's v2 PR merges, to avoid giving him extra work to do in that already-quite-involved PR :)

@illicitonion illicitonion merged commit 36fdbd8 into pantsbuild:master Apr 18, 2019

@illicitonion illicitonion deleted the twitter:dwagnerhall/collection/bool branch Apr 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.