Skip to content

SyntaxWarning: invalid escape sequence with python 3.13 #131

Open
@yherve

Description

@yherve

Hi. First of all, thanks for sharing this library, it is great.

With python 3.13 I have these warnings:

/data/repo/sdwaas/smcaas-infra/src/smcaas-cli/.venv/lib/python3.13/site-packages/table2ascii/exceptions.py:37: SyntaxWarning: invalid escape sequence '\ '
  """Exception raised when the number of columns in the footer
/data/repo/sdwaas/smcaas-infra/src/smcaas-cli/.venv/lib/python3.13/site-packages/table2ascii/exceptions.py:61: SyntaxWarning: invalid escape sequence '\ '
  """Exception raised when the number of columns in the body
/data/repo/sdwaas/smcaas-infra/src/smcaas-cli/.venv/lib/python3.13/site-packages/table2ascii/exceptions.py:90: SyntaxWarning: invalid escape sequence '\ '
  """Exception raised when the number of alignments does not match
/data/repo/sdwaas/smcaas-infra/src/smcaas-cli/.venv/lib/python3.13/site-packages/table2ascii/exceptions.py:114: SyntaxWarning: invalid escape sequence '\ '
  """Exception raised when the number of column widths does not match

the fix is easy, just remove or use double backslash

Note: in the meantime, here is how to ignore these warnings:

    import warnings
    warnings.filterwarnings("ignore")

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