Skip to content

Commit bc9ed0d

Browse files
committed
nit: lint
1 parent 393a875 commit bc9ed0d

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

application/cmd/cre_main.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,15 +340,15 @@ def parse_standards_from_spreadsheeet(
340340
populate_neo4j_db(cache_location)
341341
if not os.environ.get("CRE_NO_GEN_EMBEDDINGS"):
342342
prompt_handler.generate_embeddings_for(defs.Credoctypes.CRE.value)
343+
343344
import_only = []
344345
if os.environ.get("CRE_ROOT_CSV_IMPORT_ONLY", None):
345346
import_list = os.environ.get("CRE_ROOT_CSV_IMPORT_ONLY")
346347
try:
347348
import_list_json = json.loads(import_list)
348349
except json.JSONDecodeError as jde:
349-
logger.error(
350-
f"value '{os.environ.get("CRE_ROOT_CSV_IMPORT_ONLY")}' is not valid json"
351-
)
350+
env_value = os.environ.get("CRE_ROOT_CSV_IMPORT_ONLY")
351+
logger.error(f"value '{env_value}' is not valid json")
352352
raise jde
353353
if type(import_list_json) == list:
354354
import_only.extend(import_list_json)
@@ -366,7 +366,9 @@ def parse_standards_from_spreadsheeet(
366366
)
367367
continue
368368
if import_only and standard_name not in import_only:
369-
logger.info(f"skipping standard {standard_name} as it's not in the list of {import_only}")
369+
logger.info(
370+
f"skipping standard {standard_name} as it's not in the list of {import_only}"
371+
)
370372
continue
371373
jobs.append(
372374
q.enqueue_call(

application/tests/cre_main_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,9 @@ def test_parse_standards_from_spreadsheeet(
420420
mock_db_connect.return_value = self.collection
421421
# No jobs scheduled when we're registering CREs only
422422
expected_cre_only_input, _ = data_gen.root_csv_cre_only()
423-
main.parse_standards_from_spreadsheeet(expected_cre_only_input, "", prompt_handler)
423+
main.parse_standards_from_spreadsheeet(
424+
expected_cre_only_input, "", prompt_handler
425+
)
424426
mock_enqueue_call.assert_not_called()
425427

426428
# Jobs scheduled when we're registering Standards only

0 commit comments

Comments
 (0)