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

mark several strings as raw #841

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

mark several strings as raw #841

wants to merge 1 commit into from

Conversation

mr-c
Copy link

@mr-c mr-c commented Sep 10, 2024

To deal with a Windows slash, and other sequences that get misinterpreted as escape sequences

Prevents the following warnings:

/usr/share/invesalius/app.py:507: SyntaxWarning: invalid escape sequence '\I'
  key = "InVesalius 3.1\InstalliationDir"
/usr/share/invesalius/invesalius/data/transformations.py:33: SyntaxWarning: invalid escape sequence '\*'
  """Homogeneous Transformation Matrices and Quaternions.
/usr/share/invesalius/invesalius/data/transformations.py:890: SyntaxWarning: invalid escape sequence '\*'
  """Return affine transform matrix to register two point sets.
/usr/share/invesalius/invesalius/data/transformations.py:999: SyntaxWarning: invalid escape sequence '\*'
  """Return matrix to transform given 3D point set into second point set.
/usr/share/invesalius/invesalius/reader/bitmap_reader.py:121: SyntaxWarning: invalid escape sequence '\d'
  c_re = re.compile("\d+")

To deal with a Windows slash, and other sequences that get
misinterpreted as escape sequences

Prevents the following warnings:

```
/usr/share/invesalius/app.py:507: SyntaxWarning: invalid escape sequence '\I'
  key = "InVesalius 3.1\InstalliationDir"
/usr/share/invesalius/invesalius/data/transformations.py:33: SyntaxWarning: invalid escape sequence '\*'
  """Homogeneous Transformation Matrices and Quaternions.
/usr/share/invesalius/invesalius/data/transformations.py:890: SyntaxWarning: invalid escape sequence '\*'
  """Return affine transform matrix to register two point sets.
/usr/share/invesalius/invesalius/data/transformations.py:999: SyntaxWarning: invalid escape sequence '\*'
  """Return matrix to transform given 3D point set into second point set.
/usr/share/invesalius/invesalius/reader/bitmap_reader.py:121: SyntaxWarning: invalid escape sequence '\d'
  c_re = re.compile("\d+")
```
@mr-c mr-c changed the title mark a string as raw to deal with a Windows slash mark several strings as raw Sep 10, 2024
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