advertools
advertools copied to clipboard
invalid escape codes in doc comments
When you load the advertools, in my case importing sitemap_to_df you get a number of SyntaxWarnings due to invalid escape codes in doc comments, specifcially:
.venv/lib/python3.12/site-packages/advertools/logs.py:1: SyntaxWarning: invalid escape sequence '\-'
"""
.venv/lib/python3.12/site-packages/advertools/robotstxt.py:1: SyntaxWarning: invalid escape sequence '\*'
"""
.venv/lib/python3.12/site-packages/advertools/crawlytics.py:1: SyntaxWarning: invalid escape sequence '\_'
"""
.venv/lib/python3.12/site-packages/advertools/youtube.py:310: SyntaxWarning: invalid escape sequence '\_'
I suspect the backslash is intended to be a literal one, so instead of '-' it should to be '\-'?
Thanks a lot @stevenh
Yes, you're right. There is a bunch of rst strings that need escaping. I've created a fix, and should deploy a patch version soon. Will keep this issue until you confirm it's working on your side.
Appreciate the heads up!
Any updates?