Skip to content

get rid of warnings for invalid escape sequenes#4

Open
adam-huganir wants to merge 2 commits intopebble-dev:masterfrom
adam-huganir:patch-1
Open

get rid of warnings for invalid escape sequenes#4
adam-huganir wants to merge 2 commits intopebble-dev:masterfrom
adam-huganir:patch-1

Conversation

@adam-huganir
Copy link

python is weird about escape sequences and tries to guess what you mean and throws a warning. in this case escaping the \ probably makes the most sense as it doesnt have any side affects (vs using r"some\ string"). the warnings always bug me so i try to fix them when i can

quick sanity check:

>>> "this is a\ test" == "this is a\\ test"
<stdin>:1: SyntaxWarning: invalid escape sequence '\ '
True

Original error from my terminal logs:

~/Code/etc %> pebble sdk install latest
/home/adam/.local/share/uv/tools/pebble-tool/lib/python3.13/site-packages/libpebble2/protocol/base/__init__.py:78: SyntaxWarning: invalid escape sequence '\*'
  """
/home/adam/.local/share/uv/tools/pebble-tool/lib/python3.13/site-packages/libpebble2/protocol/base/types.py:178: SyntaxWarning: invalid escape sequence '\ '
  """
/home/adam/.local/share/uv/tools/pebble-tool/lib/python3.13/site-packages/libpebble2/protocol/base/types.py:426: SyntaxWarning: invalid escape sequence '\ '
  """
/home/adam/.local/share/uv/tools/pebble-tool/lib/python3.13/site-packages/libpebble2/protocol/base/types.py:481: SyntaxWarning: invalid escape sequence '\ '
  """
Installing SDK...

By using the Pebble SDK, you agree to the following:
...

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