You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deprecation warnings are raised due to invalid escape sequences. This can be fixed by using raw strings or escaping the literals. pyupgrade also helps in automatic conversion : https://github.com/asottile/pyupgrade/
value = value.replace('"', '\"') does not escape as the author intended. '"' == '\"' is True, the backslash is not interpreted as a literal. To fix, replace that line with value = value.replace('"', '\\"')
We are no longer getting an warning but syntax error:
File "/opt/virtualenvs/py311/lib64/python3.11/site-packages/telegraf/__init__.py", line 4, in <module>
from .client import TelegrafClient, HttpClient
File "/opt/virtualenvs/py311/lib64/python3.11/site-packages/telegraf/client.py", line 2, in <module>
from telegraf.protocol import Line
File "/opt/virtualenvs/py311/lib64/python3.11/site-packages/telegraf/protocol.py", line 1, in <module>
from telegraf.utils import format_string, format_value
File "/opt/virtualenvs/py311/lib64/python3.11/site-packages/telegraf/utils.py", line 9
"""
^^^
SyntaxError: invalid escape sequence '\)'
Exit code: 1
Deprecation warnings are raised due to invalid escape sequences. This can be fixed by using raw strings or escaping the literals. pyupgrade also helps in automatic conversion : https://github.com/asottile/pyupgrade/
The text was updated successfully, but these errors were encountered: