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

[Peer Review] Enforce consistent code style #8

Closed
cthoyt opened this issue Oct 2, 2020 · 0 comments
Closed

[Peer Review] Enforce consistent code style #8

cthoyt opened this issue Oct 2, 2020 · 0 comments

Comments

@cthoyt
Copy link
Contributor

cthoyt commented Oct 2, 2020

More on the theme of "code as the methods section" - I would strongly suggest applying some formatting to the code, as it currently has a mashup of inconsistent styles. This makes it difficult to read. There's also the secondary benefit of finding possible mistakes when doing the cleanup. A really good way to start enforcing consistent code style is to:

  1. Apply black. This tools is completely automatic and gets your code into an almost reader-ready state
  2. Apply flake8. I'll shamelessly link you to my own blog post, which is exactly written for people who might just first be learning about code formatters, code style checkers, and automation of their respective application.
  3. Set up continuous integration to make sure new commits don't break the style rules

Again, I'm happy to help you understand these things and work through it.

@cthoyt cthoyt changed the title Enforce consistent code style [Peer Review] Enforce consistent code style Aug 22, 2022
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

No branches or pull requests

1 participant