JessicaTegner / pypandoc

Thin wrapper for "pandoc" (MIT)
http://pypi.python.org/pypi/pypandoc/
Other
843 stars 108 forks source link

Flake8 W605 invalid escape sequence '\.' #361

Closed jfishe closed 3 months ago

jfishe commented 3 months ago

https://github.com/JessicaTegner/pypandoc/blob/315c6b9c844ed241e327198140a498fe59fc21eb/pypandoc/pandoc_download.py#L61 appears to contain a SyntaxError. "|x86|mac).*\.(?:msi|deb|pkg)" should be r"|x86|mac).*\.(?:msi|deb|pkg)".

E     File "/home/jdfen/dev/panvimwiki/.tox/default/.venv/lib/python3.11/site-packages/pypandoc/pandoc_download.py", line 61
E       regex = re.compile(r"/jgm/pandoc/releases/download/.*(?:"+processor_architecture+"|x86|mac).*\.(?:msi|deb|pkg)")
E                                                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E   SyntaxError: invalid escape sequence '\.'

The error manifests when using tox-uv to run pytest; normal tox with pip does not.