File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -340,15 +340,15 @@ def parse_standards_from_spreadsheeet(
340
340
populate_neo4j_db (cache_location )
341
341
if not os .environ .get ("CRE_NO_GEN_EMBEDDINGS" ):
342
342
prompt_handler .generate_embeddings_for (defs .Credoctypes .CRE .value )
343
+
343
344
import_only = []
344
345
if os .environ .get ("CRE_ROOT_CSV_IMPORT_ONLY" , None ):
345
346
import_list = os .environ .get ("CRE_ROOT_CSV_IMPORT_ONLY" )
346
347
try :
347
348
import_list_json = json .loads (import_list )
348
349
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" )
352
352
raise jde
353
353
if type (import_list_json ) == list :
354
354
import_only .extend (import_list_json )
@@ -366,7 +366,9 @@ def parse_standards_from_spreadsheeet(
366
366
)
367
367
continue
368
368
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
+ )
370
372
continue
371
373
jobs .append (
372
374
q .enqueue_call (
Original file line number Diff line number Diff line change @@ -420,7 +420,9 @@ def test_parse_standards_from_spreadsheeet(
420
420
mock_db_connect .return_value = self .collection
421
421
# No jobs scheduled when we're registering CREs only
422
422
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
+ )
424
426
mock_enqueue_call .assert_not_called ()
425
427
426
428
# Jobs scheduled when we're registering Standards only
You can’t perform that action at this time.
0 commit comments