question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Changes introduced to string quoting in responses

See original GitHub issue

First 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
davidismcommented, Jun 10, 2020

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.

0reactions
WhyNotHugocommented, Jun 11, 2020

Thanks!

– Hugo Osvaldo Barrera

On 2020-06-11, at 18:48, David Lord notifications@github.com wrote:

Closed #1499.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found