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 SyntaxWarnings in treetime/merger_models.py. #285

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

emollier
Copy link

@emollier emollier commented Nov 9, 2024

Embedded TeX mathematical snippets are causing the below warnings:

  /usr/lib/python3/dist-packages/treetime/merger_models.py:187:
SyntaxWarning: invalid escape sequence '\k'
    '''
  /usr/lib/python3/dist-packages/treetime/merger_models.py:197:
SyntaxWarning: invalid escape sequence '\l'
    '''
  /usr/lib/python3/dist-packages/treetime/merger_models.py:209:
SyntaxWarning: invalid escape sequence '\l'
    '''

Switching the affected strings to raw strings with prefix r resolves the issue first, and second allows getting back our τ characters with single slash; it is assumed that the duplicate slash was necessary because Python's regular string would otherwise throw a <Tab>au instead of a \tau.

This issue has been first reported as Debian bug#1086965.

Embedded TeX mathematical snippets are causing the below warnings:

	  /usr/lib/python3/dist-packages/treetime/merger_models.py:187:
	SyntaxWarning: invalid escape sequence '\k'
	    '''
	  /usr/lib/python3/dist-packages/treetime/merger_models.py:197:
	SyntaxWarning: invalid escape sequence '\l'
	    '''
	  /usr/lib/python3/dist-packages/treetime/merger_models.py:209:
	SyntaxWarning: invalid escape sequence '\l'
	    '''

Switching the affected strings to raw strings with prefix r resolves
the issue first, and second allows getting back our τ characters with
single slash; it is assumed that the duplicate slash was necessary
because Python's regular string would otherwise throw a <Tab>au instead
of a \tau.

This issue has been first reported as [Debian bug#1086965].

[Debian bug#1086965]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1086965

Signed-off-by: Étienne Mollier <[email protected]>
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.

1 participant