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

Deprecation warning due to invalid escape sequences. #499

Open
tirkarthi opened this issue Apr 24, 2020 · 2 comments
Open

Deprecation warning due to invalid escape sequences. #499

tirkarthi opened this issue Apr 24, 2020 · 2 comments

Comments

@tirkarthi
Copy link

Deprecation warning due to invalid escape sequences. Using raw strings or escaping them again helps in resolving this. Check https://github.com/asottile/pyupgrade/ for automatic fix of this.

./tests/notebooks/mirror/ipynb_to_script_vim_folding_markers/Line_breaks_in_LateX_305.py:32: DeprecationWarning: invalid escape sequence \d
  '''
./tests/notebooks/mirror/ipynb_to_script_vscode_folding_markers/Line_breaks_in_LateX_305.py:32: DeprecationWarning: invalid escape sequence \d
  '''
./tests/notebooks/mirror/ipynb_to_sphinx/Line_breaks_in_LateX_305.py:9: DeprecationWarning: invalid escape sequence \d
  """
./tests/notebooks/mirror/ipynb_to_sphinx/Line_breaks_in_LateX_305.py:32: DeprecationWarning: invalid escape sequence \d
  '''
./tests/notebooks/mirror/ipynb_to_percent/Line_breaks_in_LateX_305.py:32: DeprecationWarning: invalid escape sequence \d
  '''
./tests/notebooks/mirror/ipynb_to_hydrogen/Line_breaks_in_LateX_305.py:32: DeprecationWarning: invalid escape sequence \d
  '''
./tests/notebooks/mirror/ipynb_to_script/Line_breaks_in_LateX_305.py:30: DeprecationWarning: invalid escape sequence \d
  '''
@mwouts
Copy link
Owner

mwouts commented May 21, 2020

Hello @tirkarthi , thanks for pointing this out. Well, the files that you are looking at are representations of this notebook that contains $\LaTeX$ formulas.

Would you expect Jupytext to translate the original string that does contains inputs like "\d" (unescaped backslash), into "\\d" (escaped backslash), and then back to "\d"? Do you know how to do that programmatically? Thanks!

@mwouts
Copy link
Owner

mwouts commented Dec 9, 2021

A fraction of this issue was addressed with #836, but I see that some non-raw string remains at e.g. https://github.com/mwouts/jupytext/blob/main/tests/notebooks/mirror/ipynb_to_script_vim_folding_markers/Line_breaks_in_LateX_305.py

I'll have a look when time permits.

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