Skip to content

feat: Add a setting to disallow hard-coding some setting keys in the pyproject.toml #1078

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

LecrisUT
Copy link
Collaborator

This complements the discussion in #1050 that we should not allow some fields to be hard-coded. We should allow them in the context of overrides, so here is a rather convoluted way of adding that check.

This will also make it possible to extend it further if we want more specific checks for specific overrides matchers as well. E.g. we can add a restriction that build.requires cannot have @ in an sdist

@LecrisUT LecrisUT force-pushed the feat/no-hardcode-opts branch from a2504cc to 9922ae6 Compare May 14, 2025 15:13
@LecrisUT LecrisUT force-pushed the feat/no-hardcode-opts branch 3 times, most recently from 9a77549 to 417a6e7 Compare May 15, 2025 07:37
LecrisUT and others added 4 commits July 1, 2025 15:52
Used for further validations

Signed-off-by: Cristian Le <[email protected]>
Add `test_disallow_hardcoded` to cover these type of settings

Signed-off-by: Cristian Le <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
@henryiii henryiii force-pushed the feat/no-hardcode-opts branch from 417a6e7 to bbc3671 Compare July 1, 2025 20:40
@henryiii henryiii force-pushed the feat/no-hardcode-opts branch from 53aed69 to f1a073a Compare July 3, 2025 21:45
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