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

Maint/isort #219

Merged
merged 5 commits into from
Aug 3, 2020
Merged

Maint/isort #219

merged 5 commits into from
Aug 3, 2020

Conversation

mschmidt87
Copy link
Member

@mschmidt87 mschmidt87 commented Jul 31, 2020

This PR introduces isort to our tools ensuring common coding standards and uniform layout across the library.

isort sorts import statements in a particular, reproducible order, namely like this: FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER

This PR:

  • applies isort to all files in the library, testsuite, and examples. Therefore there are a lot of changes in many files, but they are just about formatting, mostly to the imports. Some changes are introduced by black as well (trailing commas in function definitions). I am not sure why this happens.
  • adds a config file for isort
  • adds isort to the required dev libraries
  • adds isort as an additional check to the CI.
  • adds my pre-commit configuration file to the repository. This will make it easier for other contributors to install the pre-commit hooks using that config file.

@mschmidt87 mschmidt87 added the maintenance Fighting the second law label Jul 31, 2020
@mschmidt87 mschmidt87 added this to the 0.2.0 milestone Jul 31, 2020
@mschmidt87 mschmidt87 requested a review from jakobj July 31, 2020 01:26
Copy link
Member

@jakobj jakobj left a comment

Choose a reason for hiding this comment

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

so.much.tooling 🤤 🚀

thanks, this looks great! this has always bothered me, nice to see it's so easy to solve. added two meta comments.

.pre-commit-config.yaml Outdated Show resolved Hide resolved
.travis.yml Outdated Show resolved Hide resolved
Copy link
Member

@jakobj jakobj left a comment

Choose a reason for hiding this comment

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

looks good, thanks! 👍

@jakobj
Copy link
Member

jakobj commented Aug 3, 2020

before we merge, please squash the commits

@mschmidt87
Copy link
Member Author

Thanks, I organized this now into 5 commits, which makes sense, in my opinion. Objections, @jakobj ?

@jakobj
Copy link
Member

jakobj commented Aug 3, 2020

i'm happy! merging :)

@jakobj jakobj merged commit 2dbad6e into master Aug 3, 2020
@mschmidt87 mschmidt87 deleted the maint/isort branch November 8, 2020 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Fighting the second law
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants