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

Add check for single quoted values #22

Merged
merged 5 commits into from
Jan 12, 2023
Merged

Add check for single quoted values #22

merged 5 commits into from
Jan 12, 2023

Conversation

polm
Copy link
Contributor

@polm polm commented Jan 12, 2023

Values in confection are JSON values. One thing that can confuse people is that single quoting such values is not valid, and the quotes will be interpreted as being part of the string, as raised in explosion/spaCy#9454.

This PR checks for values that seem to be single quoted and warns about them.

Also, I hadn't realized it before this PR, but apparently empty values are valid, like this:

[x]
y =
z = 2

@polm polm linked an issue Jan 12, 2023 that may be closed by this pull request
@rmitsch rmitsch added the enhancement New feature or request label Jan 12, 2023
Copy link
Contributor

@rmitsch rmitsch left a comment

Choose a reason for hiding this comment

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

Nice idea! Just a minor suggestion for readability, feel free to ignore.

confection/__init__.py Outdated Show resolved Hide resolved
confection/__init__.py Outdated Show resolved Hide resolved
confection/__init__.py Show resolved Hide resolved
Co-authored-by: Raphael Mitsch <[email protected]>
@polm polm merged commit f7b34c6 into main Jan 12, 2023
@svlandeg svlandeg deleted the ux/warn-single-quotes branch May 31, 2024 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Single quotes in config files
2 participants