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

Corrected configuration of exclude statements in pre-commit configuration #104

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

JonathanWenger
Copy link
Collaborator

Description
Currently the pre-commit configuration assumes glob matching in the exclude statements, even though these are assumed to be regular expressions. This causes the exclude statements to match the wrong files and shows warnings when running pre-commit.

[WARNING] The 'exclude' field in hook 'flake8' is a regex, not a glob -- matching '/*' probably isn't what you want here
[WARNING] The 'exclude' field in hook 'ufmt' is a regex, not a glob -- matching '/*' probably isn't what you want here
[WARNING] The 'exclude' field in hook 'require-ascii' is a regex, not a glob -- matching '/*' probably isn't what you want here
[WARNING] The 'exclude' field in hook 'forbid-binary' is a regex, not a glob -- matching '/*' probably isn't what you want here

This PR replaces the glob statements with regular expressions in the pre-commit configuration.

Related Issues
This seems to be a common error and similar PRs have been made to other libraries (e.g. openml/openml-python#1129; cornellius-gp/gpytorch#2541)

@JonathanWenger JonathanWenger self-assigned this Jan 13, 2025
Copy link
Collaborator

@Balandat Balandat left a comment

Choose a reason for hiding this comment

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

globbledygook!

@Balandat Balandat merged commit 68feb8a into main Jan 14, 2025
5 of 6 checks passed
@Balandat Balandat deleted the precommit-config branch January 14, 2025 05:28
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