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

fix default value of ensure_ascii to match comments #2538

Merged
merged 5 commits into from Sep 23, 2022

Conversation

onlyacat
Copy link
Contributor

@onlyacat onlyacat commented Sep 22, 2022

Type of changes

  • Bug fix
  • New feature
  • Documentation / docstrings
  • Tests
  • Other

Checklist

  • I've run the latest black with default args on new code.
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • I've added tests for new code.
  • I accept that @willmcgugan may be pedantic in the code review.

Description

Make the behaviour of ensure_ascii parameter match the comments and the documents.

The default value of ensure_ascii is supposed to be False, but it is True in the master branch, according to the comments or the documents, like:

ensure_ascii: bool = True,

and

ensure_ascii (bool, optional): Escape all non-ascii characters. Defaults to False.


I am not sure of the original preference, but I think the escaping result may be confusing since it looks like an additional unexpected process.

Thus I change the default value to False.

@onlyacat
Copy link
Contributor Author

PTAL /cc @willmcgugan

CHANGELOG.md Outdated
@@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix NO_COLOR support on legacy Windows https://github.com/Textualize/rich/pull/2458
- Fix pretty printer handling of cyclic references https://github.com/Textualize/rich/pull/2524
- Fix missing `mode` property on file wrapper breaking uploads via `requests` https://github.com/Textualize/rich/pull/2495
- Fix mismatching default value of prarmeter `ensure_ascii` https://github.com/Textualize/rich/pull/2538
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo

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

Successfully merging this pull request may close these issues.

None yet

3 participants