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

Minor: quiet two syntax warnings about string escape sequences #616

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

mperrin
Copy link
Collaborator

@mperrin mperrin commented Apr 19, 2024

Minor change in some string outputs; no functional change in code or math implementation. This PR quiets those with some tiny edits that fix a couple bits of string formatting.

Running in python 3.12 yielded some syntax warnings about invalid escape sequence. These are valid warnings about minor errors; it seems like somebody improved the string parser upstream to be more informative or check more.

WARNING - /Users/mperrin/Dropbox/Documents/software/poppy/poppy/utils.py:1339: SyntaxWarning: invalid escape sequence '\*'
WARNING - /Users/mperrin/Dropbox/Documents/software/poppy/poppy/zernike.py:103: SyntaxWarning: invalid escape sequence '\s'
  return "\sqrt{%d}* ( %s ) * \\cos(%d \\theta)" % (2 * (n + 1), outstr, m)
WARNING - /Users/mperrin/Dropbox/Documents/software/poppy/poppy/zernike.py:105: SyntaxWarning: invalid escape sequence '\s'
  return "\sqrt{%d}* ( %s ) * \\sin(%d \\theta)" % (2 * (n + 1), outstr, m)

@mperrin
Copy link
Collaborator Author

mperrin commented Apr 26, 2024

@BradleySappington this is a fairly trivial PR and does not really need much review; would you be able to take a look and hopefully approve, please?

@mperrin mperrin self-assigned this Apr 26, 2024
Copy link
Collaborator

@BradleySappington BradleySappington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BradleySappington BradleySappington merged commit 9107ebb into spacetelescope:develop Apr 29, 2024
7 checks passed
@mperrin mperrin deleted the string_syntax branch April 29, 2024 13:33
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.

2 participants