Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use pre-commit for linting#607

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
AlexWaygood wants to merge1 commit intomain
base:main
Choose a base branch
Loading
frompre-commit
Open

Use pre-commit for linting#607

AlexWaygood wants to merge1 commit intomainfrompre-commit

Conversation

AlexWaygood
Copy link
Member

This PR adds a pre-commit-config file to the repo and removes our linting GitHub Actions workflow. It shouldn't be merged unless we:

  1. Agree that we want this!
  2. Either:
    a. Enable pre-commit.ci on this repo or
    b. Replace the GitHub Actions workflow with one that useshttps://github.com/pre-commit/action

My main motivation for proposing this change is that there are various linting tools that I think would be useful for this project that exist conveniently as pre-commit hooks, and which can be run easily in isolated environments via pre-commit. There are actually several other tools that I'd like to add (zizmor, a security linter, would be very relevant here, I think) but which have several complaints on the repo as-is -- if this is accepted, I'll add them in followup PRs so it's easy to identify exactly why we're making each change.

The downside of this change is that we're once again using tools written in Python to lint this repo. pre-commit doesn't currently appear to have a direct or indirect dependency on typing_extensions, but that could easily change in the future. It's fairly easy to simply run pre-commit using uv or pipx to ensure that pre-commit itself is installed into a standalone virtual environment, but this does require a little bit more explanation in our CONTRIBUTING guide.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

all the line endings have changed in this file; there are no other changes

@JelleZijlstra
Copy link
Member

The downside of this change is that we're once again using tools written in Python to lint this repo. pre-commit doesn't currently appear to have a direct or indirect dependency on typing_extensions, but that could easily change in the future.

I think this is fine for linting steps that don't attempt to import typing-extensions. It's more important for unit tests.

AlexWaygood reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@AlexWaygood@JelleZijlstra

[8]ページ先頭

©2009-2025 Movatter.jp