django-common icon indicating copy to clipboard operation
django-common copied to clipboard

Deprecation warning due to invalid escape sequences

Open tirkarthi opened this issue 4 years ago • 0 comments

Deprecation warnings are raised due to invalid escape sequences. This can be fixed by using raw strings or escaping the literals. pyupgrade also helps in automatic conversion : https://github.com/asottile/pyupgrade/

find . -iname '*.py' | grep -v example | grep -v doc | xargs -P4 -I{} python3.8 -Wall -m py_compile {}
./django_common/db_fields.py:134: DeprecationWarning: invalid escape sequence \.
  ], ["^django_common\.db_fields\.UniqueSlugField"])
./django_common/db_fields.py:173: DeprecationWarning: invalid escape sequence \.
  ], ["^django_common\.db_fields\.RandomHashField"])
./django_common/db_fields.py:240: DeprecationWarning: invalid escape sequence \.
  ], ["^django_common\.db_fields\.EncryptedTextField"])
./django_common/db_fields.py:264: DeprecationWarning: invalid escape sequence \.
  ], ["^django_common\.db_fields\.EncryptedCharField"])
./django_common/scaffold.py:200: DeprecationWarning: invalid escape sequence \d
  URL_CONTENT = """
./django_common/scaffold.py:213: DeprecationWarning: invalid escape sequence \d
  URL_EXISTS_CONTENT = """

tirkarthi avatar Jul 19 '20 05:07 tirkarthi