Skip to content

Fix invalid escape sequence messages #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fredsonnenwald
Copy link

When running

from omymodels.models.pydantic import types

under Python 3.12 I get

<unknown>:1: SyntaxWarning: invalid escape sequence '\#'
<unknown>:1: SyntaxWarning: invalid escape sequence '\-'

Based on erikrose/parsimonious#246 this seems to be due to Python getting more aggressive about escape sequences. It also looks like there's a fairly straightforward fix that involves marking the string as a raw string, which I've done in this patch. After making that change the invalid escape sequence messages go away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant