Skip to content

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

Merged
Balandat merged 1 commit into
masterfrom
pre-commit-config
Jun 27, 2024
Merged

Balandat merged 1 commit into
masterfrom
pre-commit-config

Conversation

@JonathanWenger

Copy link
Copy Markdown
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

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)

@JonathanWenger JonathanWenger self-assigned this Jun 26, 2024
@JonathanWenger JonathanWenger changed the title Correct configuration of exclude statements in pre-commit configuration Corrected configuration of exclude statements in pre-commit configuration Jun 26, 2024
@JonathanWenger
JonathanWenger requested a review from gpleiss June 26, 2024 19:17

@Balandat Balandat left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thanks

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