-
Notifications
You must be signed in to change notification settings - Fork 741
Description
Before filling a bug
- have you checked the faq for known issues.
- have you checked existing issues
Describe the bug
The python azure sdk uses this module to generate its models. These models all raise SyntaxWarnings b/c the generated docstrings have invalid escape charaters. Instead of having the user of this library manually edit their api docs to be python escape compliant, the generated methods and classes should all generate raw-strings instead of escape strings. (i.e. it should be r"""... instead of just """...)
Expected behavior
All docstrings should be raw-strings since the content likely includes escape characters we do not intend to escape.
Additional context
Python will soon upgrade these to errors from warnings, so this needs to be fixed soon.
A backslash-character pair that is not a valid escape sequence now generates a SyntaxWarning, instead of DeprecationWarning. For example, re.compile("\d+.\d+") now emits a SyntaxWarning ("\d" is an invalid escape sequence, use raw strings for regular expression: re.compile(r"\d+.\d+")). In a future Python version, SyntaxError will eventually be raised, instead of SyntaxWarning.