Skip to content

Commit 8ab8440

Browse files
committed
style: run code formatters
1 parent 3695d0f commit 8ab8440

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

web-app/django/VIM/apps/instruments/views/solr_suggest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def get(self, request):
3535
suggest_data = data.get("suggest", {}).get("default", {})
3636
suggestions = []
3737
seen = set()
38-
38+
3939
if suggest_data:
4040
first_key = list(suggest_data.keys())[0]
4141
entries = suggest_data[first_key].get("suggestions", [])
@@ -47,7 +47,7 @@ def get(self, request):
4747
seen.add(term_lower)
4848
# Replace matched part with query string to preserve casing
4949
if term_lower.startswith(query.lower()):
50-
rest_part = term[len(query):]
50+
rest_part = term[len(query) :]
5151
term = f"<b>{query}</b>{rest_part}"
5252

5353
suggestions.append(term)

web-app/frontend/src/instruments/Suggest.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ async function fetchSuggestions(query: string): Promise<string[]> {
22
if (!query.trim()) return [];
33
try {
44
const response = await fetch(
5-
`/instruments/suggest/?q=${encodeURIComponent(query)}`
5+
`/instruments/suggest/?q=${encodeURIComponent(query)}`,
66
);
77
if (!response.ok) return [];
88
const data = await response.json();
@@ -28,7 +28,8 @@ function renderSuggestionList(
2828
}
2929
suggestions.forEach((suggestion) => {
3030
const item = document.createElement('div');
31-
item.className = 'list-group-item list-group-item-action notranslate force-ltr';
31+
item.className =
32+
'list-group-item list-group-item-action notranslate force-ltr';
3233
item.innerHTML = suggestion;
3334
// On click, set input value without <b> tags
3435
item.addEventListener('click', () => {
@@ -48,7 +49,7 @@ window.addEventListener('DOMContentLoaded', () => {
4849
const list = document.getElementById(
4950
'autocomplete-list',
5051
) as HTMLElement | null;
51-
52+
5253
const form = input?.closest('form') as HTMLFormElement | null;
5354

5455
if (!input || !list || !form) return;

0 commit comments

Comments
 (0)