mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-30 03:24:55 +00:00
Minor Python fixes identified by SonarQube.
1. Remove return from EmptySearchResults.__init__. Init method is required to return None. 2. Remove useless self-assignment from BaseSearchBackend. 3. Remove useless self-assignment from wagtail.tests.settings.
This commit is contained in:
parent
8afbc6c3ec
commit
5e5484d4d7
2 changed files with 1 additions and 3 deletions
|
|
@ -260,7 +260,7 @@ class BaseSearchResults:
|
|||
|
||||
class EmptySearchResults(BaseSearchResults):
|
||||
def __init__(self):
|
||||
return super().__init__(None, None)
|
||||
super().__init__(None, None)
|
||||
|
||||
def _clone(self):
|
||||
return self.__class__()
|
||||
|
|
@ -350,7 +350,6 @@ class BaseSearchBackend:
|
|||
return EmptySearchResults()
|
||||
|
||||
# Search
|
||||
query_compiler_class = query_compiler_class
|
||||
search_query = query_compiler_class(
|
||||
queryset, query, **kwargs
|
||||
)
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ SECRET_KEY = 'not needed'
|
|||
ROOT_URLCONF = 'wagtail.tests.urls'
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
STATIC_ROOT = STATIC_ROOT
|
||||
|
||||
STATICFILES_FINDERS = (
|
||||
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
||||
|
|
|
|||
Loading…
Reference in a new issue