Closed taminomara closed 2 months ago
Am I correct that Sybil is not aware of Python syntax, and just looks through sources using regular expressions? If so, I'll switch to using raw docstrings to avoid escapes, but still I'd like to see this fixed.
Sybil fails with SyntaxError: unexpected character after line continuation character.
Please can you provide a full traceback.
You are correct that Sybil is agnostic to Python syntax, however for docstrings the ast
module is used to parse python source code and extract docstrings.
it may be that this is a quick fix, so that full traceback would be very useful.
Here's the docs to literal escaping, so this does feel like a bug in Sybil: https://docs.python.org/3/reference/lexical_analysis.html#escape-sequences
I noticed that if I use string escapes in docstrings, Sybil fails to evaluate them. Minimal example is this:
Sybil fails with SyntaxError: unexpected character after line continuation character.
I'm using
sybil==6.1.1
andPython 3.12.2
.