Skip to content

Consistent python style #27

Open
Open

Description

@DomNomNom

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.

Activity

  1. DomNomNom commented on Mar 24, 2019

    @DomNomNom
    ContributorAuthor

    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 *
  2. amsam0 commented on Jun 16, 2019

    @amsam0

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

  3. DomNomNom commented on Jun 16, 2019

    @DomNomNom
    ContributorAuthor

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

  4. amsam0 commented on Jun 16, 2019

    @amsam0

    Not a pro on that, but good idea.

  5. azeemba commented on Jul 2, 2020

    @azeemba
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions