python-fluent
python-fluent copied to clipboard
Respect the `with_spans` parser option for annotations
This PR contains a small change to stop adding span information to Annotation elements when with_spans is set to False for the parser.
I've pulled this into its own PR because it wasn't obvious whether this behaviour was intentional or not (I could see an argument that annotations are a bit useless without span information). If this isn't needed, I'm happy to close this PR.
Note that the broken tests are unrelated to this PR, and are fixed in https://github.com/projectfluent/python-fluent/pull/203.