projectfluent / python-fluent

Python implementation of Project Fluent
https://projectfluent.org/python-fluent/
Other
210 stars 26 forks source link

Respect the `with_spans` parser option for annotations #201

Closed leamingrad closed 2 months ago

leamingrad commented 4 months ago

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.

eemeli commented 2 months ago

Ah, the lint problem was fixed by the force push. Still confused by the CI results not showing up here.