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 GitHub Actions Workflow for Python Code Formatting and Linting #2191

Closed
wants to merge 2 commits into from

Conversation

Ygnas
Copy link
Contributor

@Ygnas Ygnas commented Jul 30, 2024

What this PR does / why we need it:

This PR adds a GitHub Actions workflow for Python code formatting and linting. It uses black to enforce consistent code formatting and flake8 to check for linting issues. This ensures code quality and consistency in the Python codebase.

Which issue(s) this PR fixes (optional, in Fixes #<issue number>, #<issue number>, ... format, will close the issue(s) when PR gets merged):

Fixes #1910

Checklist:

  • Docs included if any changes are user facing

Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign jeffwan for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Ygnas Ygnas changed the title Python lint format Add GitHub Actions Workflow for Python Code Formatting and Linting Jul 30, 2024
Copy link
Member

@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for implementing this @Ygnas!
Given that we migrate to pre-commit as part of this PR: #2184, do we need to add the Python formatter as part of the pre-commit ?
cc @droctothorpe

@droctothorpe
Copy link
Contributor

The new pre-commit hooks run black here. We haven't added a linter hook yet, but plan to. Would you like to implement that, @Ygnas?

@droctothorpe
Copy link
Contributor

@Ygnas
Copy link
Contributor Author

Ygnas commented Aug 6, 2024

Closing this in favour of #2195 @droctothorpe @andreyvelich

@Ygnas Ygnas closed this Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Linter and Formatter for Python Files in CI/CD
3 participants