X Tutup
Skip to content

Add 'pyproject' to types_or for ruff checks#158

Draft
mxr wants to merge 1 commit intoastral-sh:mainfrom
mxr:patch-1
Draft

Add 'pyproject' to types_or for ruff checks#158
mxr wants to merge 1 commit intoastral-sh:mainfrom
mxr:patch-1

Conversation

@mxr
Copy link

@mxr mxr commented Mar 3, 2026

Summary

This allows ruff to check RUF200 and other checks in pyproject.toml

Test Plan

pre-commit try-repo

entry: ruff check --force-exclude
language: python
types_or: [python, pyi, jupyter]
types_or: [python, pyi, jupyter, pyproject]
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a valid file type for pre-commit? I tried running the identify-cli command as described in the docs, and the results for pyproject.toml were:

["file", "non-executable", "text", "toml"]

So I'm not sure this will work.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for looking. identify-cli PR is at pre-commit/identify#581. I plan to keep this PR as a draft until that one is resolved.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh nice, thank you!

Copy link

@bn-andrew bn-andrew left a comment

Choose a reason for hiding this comment

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

Nice one, pending that upgrade in identify 👍🏻

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.

3 participants

X Tutup