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

pyBusPirateLite/I2C.py: use raw string for sniffer #34

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

Conversation

julianvilas
Copy link

The I2C.sniffer function documentation raises a SyntaxWarning in more recent python versions (3.12 in this case), complaining about an invalid escape sequence '\ '.

This commit makes the string to be interpreted as raw instead.

Before:

$ python
Python 3.12.2 (main, Feb  6 2024, 20:19:44) [Clang 15.0.0 (clang-1500.1.0.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyBusPirateLite import I2C
.../pyBusPirateLite/pyBusPirateLite/I2C.py:160: SyntaxWarning: invalid escape sequence '\ '
  """ Sniff traffic on an I2C bus.

After:

$ python
Python 3.12.2 (main, Feb  6 2024, 20:19:44) [Clang 15.0.0 (clang-1500.1.0.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyBusPirateLite import I2C

The I2C.sniffer function documentation raises a SyntaxWarning in more
recent python versions (3.12 in this case), complaining about a invalid
escape sequence '\ '.

This commit makes the string to be interpreted as raw instead.
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