Skip to content

MAINT Run pyupgrade following Python2 deprecation #12997

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

Merged
merged 4 commits into from
Feb 8, 2019

Conversation

rth
Copy link
Member

@rth rth commented Jan 16, 2019

Continues #12948

Changes are similar to what was done in #12639 and #12812

A few more maintenance changes following dropping Python 2 support. See the parent PR for more context. This is a significantly shortened version to 220 lines diff from 700 originally, but there may still be a few cosmetic changes that I missed.

@@ -90,7 +90,7 @@

score_difference = non_nested_scores - nested_scores

print("Average difference of {0:6f} with std. dev. of {1:6f}."
print("Average difference of {:6f} with std. dev. of {:6f}."
Copy link
Member

Choose a reason for hiding this comment

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

Is this intentional? Not that I actually care ;)

Copy link
Member Author

Choose a reason for hiding this comment

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

I have not bothered reverting a few such changes, as long as there are no 500 lines of those, I'm hoping it wouldn't matter much.

Copy link
Member

Choose a reason for hiding this comment

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

fine with me.

Copy link
Member

@amueller amueller left a comment

Choose a reason for hiding this comment

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

Looks like you went back on the string replacement with numbers? But I don't really have an opinion. LGTM

@amueller
Copy link
Member

Maybe merge #8022 first ;)

@rth
Copy link
Member Author

rth commented Jan 17, 2019

Thanks for the review!

Maybe merge #8022 first ;)

Sure, let's try to.

@qinhanmin2014 qinhanmin2014 merged commit 0e3bb17 into scikit-learn:master Feb 8, 2019
@rth rth deleted the pyupgrade2 branch February 8, 2019 20:21
@rth rth mentioned this pull request Feb 8, 2019
4 tasks
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
koenvandevelde pushed a commit to koenvandevelde/scikit-learn that referenced this pull request Jul 12, 2019
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.

4 participants