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

Use code formatter on source #157

Open
kjd opened this issue Nov 23, 2023 · 1 comment · May be fixed by #173
Open

Use code formatter on source #157

kjd opened this issue Nov 23, 2023 · 1 comment · May be fixed by #173
Milestone

Comments

@kjd
Copy link
Owner

kjd commented Nov 23, 2023

Review using black, ruff formatter, or similar to consistently format codebase. Note that idna-data make-libdata needs to generate code fragments that conform with this style.

@kjd kjd added this to the v4.0 milestone Nov 23, 2023
@KaiSchwarz-cnic
Copy link

KaiSchwarz-cnic commented Apr 11, 2024

You might start using super-linter in a test workflow.

steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
          persist-credentials: false
      - name: Super Linter Code Base
        uses: github/super-linter/slim@v5
        env:
          FILTER_REGEX_INCLUDE: "/hexonet/*|/scripts/*|updateVersion.sh|setup.py"
          VALIDATE_PYTHON_BLACK: true
          # further linters on demand e.g. VALIDATE_BASH: true
          VALIDATE_ALL_CODEBASE: false
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

That is at least validating newly touched files using Black. It is not auto-reformatting. That's something you would to cover through your IDE the best (e.g. VSCode, ms-python.black-formatter extension).

You may dive into adding a .devcontainer folder with respective files (Dockerfile, devcontainer.json, ...) to add a Python-based Dev Container to have always a working environment at hand which is handy if you switch to another device. You just need docker. VSCode automatically starts the container up and you can directly develop in there.

All this is coming with some work, but worth it.

@kurtmckee kurtmckee linked a pull request Apr 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants