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

Enforce presence of keys (with any values) #218

Open
sobolevn opened this issue Oct 4, 2020 · 2 comments
Open

Enforce presence of keys (with any values) #218

sobolevn opened this issue Oct 4, 2020 · 2 comments
Labels
enhancement New feature or request plugin-ini Plugin for INI files plugin-toml Plugin for TOML files style Anything related to Nitpick style files

Comments

@sobolevn
Copy link

sobolevn commented Oct 4, 2020

My current use-case is that I am working on pyproject.toml styles.
I want

[build-system]
requires = ...
build-backend = ...

to be set to any values. But, I want them set.
Currently, I cannot find any ways to do this.

Related #10

@sobolevn sobolevn added the enhancement New feature or request label Oct 4, 2020
@sobolevn sobolevn changed the title Enforce presence of keys (with possibly any value) Enforce presence of keys (with possibly any values) Oct 4, 2020
@sobolevn sobolevn changed the title Enforce presence of keys (with possibly any values) Enforce presence of keys (with any values) Oct 4, 2020
@andreoliwa
Copy link
Owner

Thanks for yet another issue, I like the idea.

TOML files need a better API, similar to how the text plugin is being shaped (see #233 (comment)).

YAML files could also have a similar approach: #127 (comment)

I still didn't think how this "presence/absence of keys" fits the API so far, but it can be used for TOML, YAML, JSON...
I will sleep on it.
But, if you have suggestions, please share, either here or on the aforementioned issues.

@andreoliwa andreoliwa added the style Anything related to Nitpick style files label Feb 13, 2021
@andreoliwa andreoliwa added plugin-ini Plugin for INI files plugin-toml Plugin for TOML files labels Mar 18, 2021
andreoliwa added a commit that referenced this issue Jan 2, 2022
andreoliwa added a commit that referenced this issue Jan 7, 2022
)

* feat(yaml): special config: custom unique keys to search elements in lists
* feat(yaml): append elements on a list
* feat(yaml): only display the element that is missing but replace the whole list underneath
* feat(yaml): compare elements individually

* style: add autoflake
* style: add prettier
* style: deprecate old pre-commit style for repos ("repos.yaml" key)
* style: update all styles with new pre-commit format

* docs: ideas for presence/absence of keys (#218 and #10)
* docs: ReadTheDocs still didn't upgrade to Python 3.9

* refactor: slightly reduce complexity (not ideal yet)
* refactor: remove dead code
@andreoliwa
Copy link
Owner

[Note to self (or to someone who might want to create a pull request for this issue before I do it 😅)]

Consider this comment when implementing a solution for this issue: #472 (comment)

@andreoliwa andreoliwa moved this to Upvoted / Requests in Nitpick Roadmap Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request plugin-ini Plugin for INI files plugin-toml Plugin for TOML files style Anything related to Nitpick style files
Projects
Status: Upvoted / Requests
Development

No branches or pull requests

2 participants