Skip to content

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