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

Quotation mark style is too strict #87

Open
Zeitsperre opened this issue Sep 15, 2020 · 2 comments
Open

Quotation mark style is too strict #87

Zeitsperre opened this issue Sep 15, 2020 · 2 comments

Comments

@Zeitsperre
Copy link

Just noticed this on a few of my failing builds today:

DOCTEST TRACEBACK
Expected:
    "La moyenne annuelle est faite sur un échantillon mensuel"

Got:
    'La moyenne annuelle est faite sur un échantillon mensuel'

Repr Difference:
    got  = "'La moyenne annuelle est faite sur un échantillon mensuel'"
    want = '"La moyenne annuelle est faite sur un échantillon mensuel"'

Poking around, this seems to also be an issue in stdlib doctest. Any potential to relax this level of scrutiny on strings?

@Erotemic
Copy link
Owner

You can submit a PR to the checker.py file where fuzzy matching happens as long as it is an option that is disabled by default.

We can talk about what the default state should be, but I want to preserve backwards compatibility within the remainder of the 0.x series. Note that any fuzzy matching does break cases where the string is ambiguous, so there are trade-offs to enabling fuzzy matching by default.

Or you can use the existing ... auto-enabled fuzzy match syntax in place of your quotes.

@Zeitsperre
Copy link
Author

Thanks for the quick response. We may need to use the work-around for now, but would really like to see a way (flag?) for easing the rules on string quotations.

I can look into how difficult this would be for me to submit a PR, but it'll have to be in my free time. Please keep this issue open for the time being. Cheers.

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

No branches or pull requests

2 participants