mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-17 19:52:25 +03:00
Update docstring
This function no longer uses generators. The docstring should reflect that. Note: because there good comments in the function body, we don't need to repeat them in the docstring.
This commit is contained in:
parent
6df509863d
commit
ffc2ed8826
|
@ -21,9 +21,7 @@ from rest_framework.settings import api_settings
|
||||||
|
|
||||||
|
|
||||||
def search_smart_split(search_terms):
|
def search_smart_split(search_terms):
|
||||||
"""generator that first splits string by spaces, leaving quoted phrases together,
|
"""Returns sanitized search terms as a list."""
|
||||||
then it splits non-quoted phrases by commas.
|
|
||||||
"""
|
|
||||||
split_terms = []
|
split_terms = []
|
||||||
for term in smart_split(search_terms):
|
for term in smart_split(search_terms):
|
||||||
# trim commas to avoid bad matching for quoted phrases
|
# trim commas to avoid bad matching for quoted phrases
|
||||||
|
|
Loading…
Reference in New Issue
Block a user