diff --git a/pyproject.toml b/pyproject.toml index f313f8576f..6d7ddbc87b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ unfixable = ['PIE794', 'ISC001'] "src/calibre/gui2/store/stores/*" = ['UP'] "src/calibre/gui2/tts/manager.py" = ['UP037'] "src/calibre/utils/copy_files.py" = ['UP037'] -"src/calibre/utils/smartypants.py" = ['RUF039', 'RUF055'] +"src/calibre/utils/smartypants.py" = ['RUF055'] "src/calibre/web/feeds/news.py" = ['RET501'] "src/qt/*.py" = ['I', 'E302'] "src/qt/*.pyi" = ['I'] diff --git a/src/calibre/utils/smartypants.py b/src/calibre/utils/smartypants.py index cf943d2cf9..3a5d72facd 100644 --- a/src/calibre/utils/smartypants.py +++ b/src/calibre/utils/smartypants.py @@ -493,7 +493,7 @@ def smartyPants(text, attr='1'): if not in_pre: t = processEscapes(t) - t = re.sub('"', '"', t) + t = re.sub(r'"', '"', t) t = dashes_func(t) t = ellipses_func(t) # Note: backticks need to be processed before quotes.