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

Consistent python style #27

Open
DomNomNom opened this issue Mar 24, 2019 · 5 comments
Open

Consistent python style #27

DomNomNom opened this issue Mar 24, 2019 · 5 comments

Comments

@DomNomNom
Copy link
Contributor

As mentioned in comments of #26

There are a few things that might be good to have consistent code style for. This issue is for discussing which code style we should have and how we best achieve this.

@DomNomNom
Copy link
Contributor Author

Some preferences of mine at this point in time:

  • Use a linter which can automatically correct style mistakes, not just point them out
  • Single quotes
  • f-strings
  • pathlib.Path rather than strings for describing paths.
  • Four space indentation.
  • Discouraging import *

@amsam0
Copy link

amsam0 commented Jun 16, 2019

One option is Black. I'm not sure how the options work, but a batch file could be created for this.

@DomNomNom
Copy link
Contributor Author

Also, doing it as a pre-commit hook or something might be useful, so we avoid situations of people accidentally not running it.

@amsam0
Copy link

amsam0 commented Jun 16, 2019

Not a pro on that, but good idea.

@azeemba
Copy link
Contributor

azeemba commented Jul 2, 2020

Are we still interested in this? I have a GitHub action config that can apply black formatting and commit/push it out after any changes land on master.

This is a commit the action pushed out: azeemba@8163214
Here is the configuration: action-test/.github/workflows/main.yml
Here are the logs: https://github.com/azeemba/RLBotGUI/runs/828744657?check_suite_focus=true

We could expand it to also do prettier for the JS code.

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

3 participants