Skip to content

comparison.py:11: SyntaxWarning: invalid escape sequence '\D' #32

@averyfreeman

Description

@averyfreeman

Hi, looks like your :math:\\Din the docstring ofcomparison.pyis throwing my interpreter, I'm onPython 3.12.3` Arch Linux OS

❯ python plot_color_gradients.py
/usr/lib/python3.12/site-packages/colorspacious/comparison.py:11: SyntaxWarning: invalid escape sequence '\D'
  """Computes the :math:`\Delta E` distance between pairs of colors.

I put a second backslash behind every single backslash in the docstring, and I can use the library now. I am not familiar with the :math: escapes, so I am not sure what that does to your document formatting.

I found discussion concerning the issue I faced on stackoverflow.com

If double-escapes break formatting for sphinx, maybe put the docstring in a separate file (?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions