8000 CLN some code cleansing in preprocessing by lorentzenchr · Pull Request #18686 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

CLN some code cleansing in preprocessing #18686

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 7 commits into from
Aug 31, 2021

Conversation

lorentzenchr
Copy link
Member
@lorentzenchr lorentzenchr commented Oct 26, 2020

Reference Issues/PRs

despite #11336 (what's the status of our discussion about using black?)

What does this implement/fix? Explain your changes.

Some code cleansing in the module preprocessing.

Copy link
Member
@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

Thanks For the PR @lorentzenchr

Apart from the minor docstring formatting fix (new line removal), I don't find the other changes to be really needed here. Typically the import reordering is something we don't respect and that will be broken in the future anyway. I believe that we usually don't merge that kind of PR, though I can't find a precedent ATM. They create unnecessary merge conflicts, obfuscate git blame, and take review time for very little gain in maintainability / cleanness.

@lorentzenchr
Copy link
Member Author

@NicolasHug I do not intent to have a long discussion. Still a few points:

Advantage of clean code:

  • better serves as a reference for others
  • makes contributions easier
  • contributor's experience, e.g. clean installation of pycharm and then open scikit-learn repo!
  • less discussions about code cleansing 🐍

Is it time for a PR enabling black?

@lorentzenchr
Copy link
Member Author

@NicolasHug I reverted most cosmetic changes. Do you feel more comfortable this way or would you prefer to only have the removal of the # noqua?

@NicolasHug
Copy link
Member

Seems like part of the changes here are going to be overridden / fixed when applying black anyway?

Base automatically changed from master to main January 22, 2021 10:53
@lorentzenchr
Copy link
Member Author

Seems like part of the c 8000 hanges here are going to be overridden / fixed when applying black anyway?

Some of them yes. But most of them no. In particular the removal of # noqa.

Copy link
Member
@rth rth left a comment

Choose a reason for hiding this comment

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

Thanks. Minor comments otherwise LGTM.

I'm not convinced that changes, aside from the noqa removal and docstring fixes, are necessary, but they are also probably not worth debating over.

@lorentzenchr
Copy link
Member Author

I opened #20813 with the goal for a streamlined policy for license and coding info.

Copy link
Member
@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

Thanks @lorentzenchr

@lorentzenchr lorentzenchr merged commit c90fae0 into scikit-learn:main Aug 31, 2021
@lorentzenchr lorentzenchr deleted the preprocessing_clean branch August 31, 2021 16:59
samronsin pushed a commit to samronsin/scikit-learn that referenced this pull request Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0