Skip to content

Commit

Permalink
Proper escaping
Browse files Browse the repository at this point in the history
Get rid of "DeprecationWarning: invalid escape sequence \*"
  • Loading branch information
pws21 authored and funkyfuture committed Sep 24, 2023
1 parent 8e1adba commit db88092
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cerberus/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def child_errors(self):
@property
def definitions_errors(self):
"""
Dictionary with errors of an \*of-rule mapped to the index of the definition it
Dictionary with errors of an \\*of-rule mapped to the index of the definition it
occurred in. Returns :obj:`None` if not applicable.
"""
if not self.is_logic_error:
Expand Down Expand Up @@ -183,7 +183,7 @@ def is_group_error(self):
@property
def is_logic_error(self):
"""
``True`` for validation errors against different schemas with \*of-rules.
``True`` for validation errors against different schemas with \\*of-rules.
"""
return bool(self.code & LOGICAL.code - ERROR_GROUP.code)

Expand Down

3 comments on commit db88092

@ehiggs
Copy link

@ehiggs ehiggs commented on db88092 Nov 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this being released, this remains a SyntaxError in CPython 3.11: E SyntaxError: invalid escape sequence '\*'

@funkyfuture
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please provide a test that fails upon it!

@jvhellemond
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These SyntaxWarning's are driving me (and my logs) 🥜 , a release with this fix would be much appreciated.

Please sign in to comment.