mir_eval icon indicating copy to clipboard operation
mir_eval copied to clipboard

invalid escape sequence SyntaxWarnings in docstrings

Open iansimon opened this issue 5 months ago • 3 comments

As of Python 3.12, some of the docstrings contain escape sequences that are considered invalid and yield SyntaxWarnings:

Not sure if worth fixing yet, but apparently these will become SyntaxErrors in the future...

iansimon avatar Sep 22 '25 17:09 iansimon

In sonify.py I would just say 2π-periodic without any special maths markup. It seems clear enough.

tkoeppe avatar Sep 22 '25 17:09 tkoeppe

Definitely worth fixing!

I'd second @tkoeppe 's suggestion of dropping the sphinx/reST cruft in favor of unicode. That doesn't necessarily help with the \* or \%, but I think that's probably unnecessary in the first place.

@iansimon do you know if it's possible to add an action to the docs testing CI that would check for this sort of thing?

bmcfee avatar Sep 22 '25 17:09 bmcfee

I'm not sure if these \% and \* were in support of some other doc processing system, but very naively thinking I'd just remove the backslashes and that would look like what I'd expect?

tkoeppe avatar Sep 22 '25 17:09 tkoeppe