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

[BUG] Deprecation warning due to invalid escape sequences #210

Closed
tirkarthi opened this issue Aug 5, 2020 · 0 comments · Fixed by #211
Closed

[BUG] Deprecation warning due to invalid escape sequences #210

tirkarthi opened this issue Aug 5, 2020 · 0 comments · Fixed by #211

Comments

@tirkarthi
Copy link
Contributor

Describe the bug

Deprecation warnings are raised due to invalid escape sequences. This can be fixed by using raw strings or escaping the literals. pyupgrade also helps in automatic conversion : https://github.com/asottile/pyupgrade/

To Reproduce

./tests/test_markup.py:26: DeprecationWarning: invalid escape sequence \[
  assert escape("foo[bar]") == "foo\[bar]"
./tests/test_markup.py:30: DeprecationWarning: invalid escape sequence \[
  result = list(_parse("[foo]hello[/foo][bar]world[/]\[escaped]"))
./rich/markup.py:50: DeprecationWarning: invalid escape sequence \[
  return markup.replace("[", "\[")

Platform
What platform (Win/Linux/Mac) are you running on? What terminal software are you using. Which version of Rich?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant