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

Add Black to GitHub Actions Workflow #56

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

crippledgeek
Copy link
Contributor

@crippledgeek crippledgeek commented Aug 26, 2024

Add Black to GitHub Actions Workflow

This PR adds the Black code formatter to our GitHub Actions workflow. Here are the key changes:

  1. Install Black:
    In the "Install dependencies" step, we've added black to the list of packages installed:

    python -m pip install flake8 pytest black
  2. New Black Formatting Step:
    We've added a new step to run Black after linting with flake8 and before running tests:

    - name: Format with Black
      run: |
        black --check --diff .

    This step runs Black in check mode (--check) and shows the diff of any formatting changes (--diff).
    The workflow will fail if there are any formatting issues, but it won't actually change the files.

Notes

  • If we want Black to automatically format the files instead of just checking, we can remove the --check and --diff flags.
  • Consider adding a .black configuration file to the repository to customize Black's behavior if needed.
  • We might want to adjust our flake8 configuration to align with Black's formatting choices, particularly the line length.

…nd shows the diff of any formatting changes (--diff). This will cause the workflow to fail if there are any formatting issues, but won't actually change the files. If you want Black to automatically format the files, you can remove the --check and --diff flags.
@crippledgeek crippledgeek changed the title The new "Format with Black" step runs Black in check mode (--check) a… Add Black to GitHub Actions Workflow Aug 26, 2024
@jahwag jahwag merged commit a15b007 into jahwag:master Aug 27, 2024
3 checks passed
@crippledgeek crippledgeek deleted the feature/add-black branch August 27, 2024 16:02
pressdarling pushed a commit to pressdarling/ClaudeSync that referenced this pull request Dec 1, 2024
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

Successfully merging this pull request may close these issues.

2 participants