Changes introduced to string quoting in responses
See original GitHub issueFirst of all, thank you for maintaining this wonderful project!
We’ve been running CI tests on our product that uses click, and tests for command-line stumbled upon a change in output representation introduced in “manual cleanup” commit.
I do not see this as an issue in click, but it took some time to find the origin, and so I suggest to mention effects of this change in documentation or changelog.
Thank you!
Expected Behavior
Previously a missing option string was displayed with double-quotes:
Error: Missing option "--os".
Actual Behavior
Now a missing option string is displayed with single-quotes, as per repr() implementation:
Error: Missing option '--os'.
Environment
- Python version: 3.8
- Click version: 7.1.1
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Single Quote, Double Quote, and Backticks in MySQL Queries
If you need to use single quotes and double quotes in a string that contains both a contraction and a quote, you will...
Read more >'Single' vs "Double" quotes for strings in javascript - Flexiple
This article is going to answer just that! Read on! Table of Contents. Difference between the two quote styles; Choosing the right quoting...
Read more >about Quoting Rules - PowerShell | Microsoft Learn
Describes rules for using single and double quotation marks in PowerShell.
Read more >How do I escape slashes and double and single quotes in sed?
For matching single quotes, switch the two types of quotes around. Note that a single quoted string may not contain single quotes (not...
Read more >Python Single vs. Double Quotes - Which Should You Use ...
It's considered a best practice to use double quotes for natural language messages, string interpolations, and whenever you know there will be ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This was intentional to make quoting consistent both across Click error messages and with the quoting used in Python error messages. Sorry for the confusion, I didn’t consider that it would be difficult to spot the difference in tests that look for exact matches. I don’t plan to revert it, but I can add a mention to the changelog, even though it’s a bit old at this point.
Thanks!
– Hugo Osvaldo Barrera