8000 [pre-commit.ci] auto fixes from pre-commit.com hooks · django-haystack/django-haystack@a1ef180 · GitHub
[go: up one dir, main page]

Skip to content

Commit a1ef180

Browse files
pre-commit-ci[bot]claudep
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 348cc84 commit a1ef180

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

haystack/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def __init__(self, **kwargs):
1818
self.haystack_connection = kwargs.pop("haystack_connection", DEFAULT_ALIAS)
1919
super_kwargs = kwargs
2020
if django_version[0] >= 4:
21-
super_kwargs['search_help_text'] = 'Search...'
21+
super_kwargs["search_help_text"] = "Search..."
2222
super().__init__(**super_kwargs)
2323

2424
def get_results(self, request):

test_haystack/solr_tests/test_solr_management_commands.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def test_build_schema(self):
221221
oldurl = settings.HAYSTACK_CONNECTIONS["solr"]["URL"]
222222

223223
conf_dir = tempfile.mkdtemp()
224-
with open(os.path.join(conf_dir, 'managed-schema'), 'w+') as fp:
224+
with open(os.path.join(conf_dir, "managed-schema"), "w+") as fp:
225225
pass
226226
try:
227227
needle = "Th3S3cr3tK3y"
@@ -262,10 +262,14 @@ def test_build_schema(self):
262262
os.path.isfile(os.path.join(conf_dir, "managed-schema.old"))
263263
)
264264

265-
with patch('haystack.management.commands.build_solr_schema.requests.get') as mock_request:
265+
with patch(
266+
"haystack.management.commands.build_solr_schema.requests.get"
267+
) as mock_request:
266268
call_command("build_solr_schema", using="solr", reload_core=True)
267269

268-
with patch('haystack.management.commands.build_solr_schema.requests.get') as mock_request:
270+
with patch(
271+
"haystack.management.commands.build_solr_schema.requests.get"
272+
) as mock_request:
269273
mock_request.return_value.ok = False
270274

271275
self.assertRaises(

test_haystack/test_management_commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ def test_rebuild_index(self, mock_handle_clear, mock_handle_update):
7777
self.assertTrue(mock_handle_clear.called)
7878
self.assertTrue(mock_handle_update.called)
7979

80-
@patch("haystack.management.commands.update_index.Command.handle", return_value='')
81-
@patch("haystack.management.commands.clear_index.Command.handle", return_value='')
80+
@patch("haystack.management.commands.update_index.Command.handle", return_value="")
81+
@patch("haystack.management.commands.clear_index.Command.handle", return_value="")
8282
def test_rebuild_index_nocommit(self, *mocks):
8383
call_command("rebuild_index", interactive=False, commit=False)
8484

0 commit comments

Comments
 (0)
0