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

Leftover Python SyntaxWarnings #346

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

Conversation

emollier
Copy link

@emollier emollier commented Dec 9, 2024

While version 0.5.1 fixed several SyntaxWarnings associated to the console logotype, there were still leftover SyntaxWarnings, captured for instance upon Debian package installation:

Setting up unicycler (0.5.1+dfsg-1) ...
/usr/lib/python3/dist-packages/unicycler/bridge_common.py:43: SyntaxWarning: invalid escape sequence '\l'
  """
/usr/lib/python3/dist-packages/unicycler/bridge_long_read.py:619: SyntaxWarning: invalid escape sequence '\c'
  """
/usr/lib/python3/dist-packages/unicycler/log.py:194: SyntaxWarning: invalid escape sequence '\['
  return re.sub('\033\[2m', '', text)

This change sets the raw string prefix for the two affected docstrings, and also escapes a backaslash in a regex that also includes a legitimate \033 escape sequence.

These issues were initially reported as Debian bug #1087157.

While version 0.5.1 fixed several SyntaxWarnings associated to the
console logotype, there were still leftover SyntaxWarnings, captured
for instance upon Debian package installation:

	Setting up unicycler (0.5.1+dfsg-1) ...
	/usr/lib/python3/dist-packages/unicycler/bridge_common.py:43: SyntaxWarning: invalid escape sequence '\l'
	  """
	/usr/lib/python3/dist-packages/unicycler/bridge_long_read.py:619: SyntaxWarning: invalid escape sequence '\c'
	  """
	/usr/lib/python3/dist-packages/unicycler/log.py:194: SyntaxWarning: invalid escape sequence '\['
	  return re.sub('\033\[2m', '', text)

This change sets the raw string prefix for the two affected
docstrings, and also escapes a backaslash in a regex that also
includes a legitimate \033 escape sequence.

These issues were initially reported as [Debian bug #1087157].

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

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