yourlabs / django-autocomplete-light

A fresh approach to autocomplete implementations, specially for Django. Status: v4 alpha, v3 stable, v2 & v1 deprecated.
https://django-autocomplete-light.readthedocs.io
MIT License
1.8k stars 467 forks source link

Fix Python string escape warning #1326

Closed adamchainz closed 1 year ago

adamchainz commented 1 year ago

Fix this warning from the test run:

test_project/select2_generic_foreign_key/test_forms.py::GenericFormTest::test_initial
  /.../django-autocomplete-light/test_project/select2_one_to_one/urls.py:21: DeprecationWarning: invalid escape sequence '\d'
    'test/(?P<pk>\d+)/$',

Using a raw string is all that's needed. More info: https://adamj.eu/tech/2022/11/04/why-does-python-deprecationwarning-invalid-escape-sequence/