Skip to content

MAINT Run pyupgrade following Python2 deprecation - #12997

Merged
qinhanmin2014 merged 4 commits into
scikit-learn:masterfrom
rth:pyupgrade2
Feb 8, 2019
Merged

qinhanmin2014 merged 4 commits into
scikit-learn:masterfrom
rth:pyupgrade2

Conversation

@rth

@rth rth commented Jan 16, 2019 •

Copy link
Copy Markdown
Member

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.

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

Choose a reason for hiding this comment

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

fine with me.

@amueller amueller left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

Maybe merge #8022 first ;)

@rth

rth commented Jan 17, 2019

Copy link
Copy Markdown
Member Author

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
3 of 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