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

Run isort, autopep8 and flake8 in pre-commit. #1224

Merged
merged 5 commits into from
Aug 20, 2024
Merged

Run isort, autopep8 and flake8 in pre-commit. #1224

merged 5 commits into from
Aug 20, 2024

Conversation

icemac
Copy link
Member

@icemac icemac commented Aug 16, 2024

I excluded pre-commit from running locally, so the changes it made show up as a commit here in the PR. (I had to make some little changes which cannot be done automatically (too long line, indentation problems)

Open tasks:

  • Change log this is just an interal change, no need to tell the world.
  • Remove isort, autopep8, flake8 from tox.ini (they need to run only once.)
  • Update meta/config, so it can produce the changes in this PR
  • require pre-commit job in GHA to succeed (via meta/config)

dataflake
dataflake previously approved these changes Aug 16, 2024
Copy link
Member

@dataflake dataflake left a comment

Choose a reason for hiding this comment

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

This is a readable PR, thanks.

By the way, this PR caught some files that are not included in the current tox configuration, like utils.py in the project root. So there's a discrepancy between a local tox run and what this PR has done that should be fixed at the same time.

@icemac
Copy link
Member Author

icemac commented Aug 16, 2024

I am going to remove these checks from tox, as running them once should be enough and we do not have the burden to maintain it in two places.

@dataflake
Copy link
Member

There will be something left, either in tox or with instructions how to do it, to execute these checks before a push, right?

@jugmac00
Copy link
Member

jugmac00 commented Aug 16, 2024

I usually run pre-commit via tox, so there can't be a discrepancy between the local checks and those in CI, and then you even do not need to install pre-commit locally, but you certainly can.

Something like this
https://github.com/jugmac00/flask-reuploaded/blob/83e0cea05fd4062825c74e660bceccf9e4ce8f72/tox.ini#L24

@dataflake
Copy link
Member

Right, I'd be interested in some invocation - preferably out of tox since that is the de-facto standard we use - to run the same steps locally that the GitHub action does.

Removed things from .meta.toml still need to be added to meta/config.
Copy link
Member

@dataflake dataflake left a comment

Choose a reason for hiding this comment

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

By the way, I removed ubuntu-lint from the branch protection rule for master and added linting

@icemac
Copy link
Member Author

icemac commented Aug 20, 2024

By the way, I removed ubuntu-lint from the branch protection rule for master and added linting

This was the last missing piece I just added to zopefoundation/meta#265.

@icemac
Copy link
Member Author

icemac commented Aug 20, 2024

Thank you for reviewing this PR. 😃

@icemac icemac merged commit 9f88fe5 into master Aug 20, 2024
28 checks passed
@icemac icemac deleted the pre-commit-1 branch August 20, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants