Skip to content

Commit 56c2b30

Browse files
Reformatting
1 parent 8b447b2 commit 56c2b30

File tree

4 files changed

+20
-16
lines changed

4 files changed

+20
-16
lines changed

src/sasctl/_services/model_repository.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,10 @@ def create_model(
359359

360360
model["scoreCodeType"] = score_code_type or model.get("scoreCodeType")
361361
model["trainTable"] = training_table or model.get("trainTable")
362-
model["classificationEventProbabilityVariableName"] = (
363-
event_prob_variable
364-
or model.get("classificationEventProbabilityVariableName")
362+
model[
363+
"classificationEventProbabilityVariableName"
364+
] = event_prob_variable or model.get(
365+
"classificationEventProbabilityVariableName"
365366
)
366367
model["classificationTargetEventValue"] = event_target_value or model.get(
367368
"classificationTargetEventValue"

src/sasctl/_services/score_execution.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ class ScoreExecution(Service):
1919

2020
_SERVICE_ROOT = "/scoreExecution"
2121

22-
list_executions, get_execution, update_execution, delete_execution = (
23-
Service._crud_funcs("/executions", "execution")
24-
)
22+
(
23+
list_executions,
24+
get_execution,
25+
update_execution,
26+
delete_execution,
27+
) = Service._crud_funcs("/executions", "execution")
2528

2629
@classmethod
2730
def create_score_execution(
@@ -71,10 +74,8 @@ def create_score_execution(
7174
try:
7275
score_execution = cls.get(
7376
f"/executions?filter=eq(scoreExecutionRequest.scoreDefinitionId,%27{score_definition_id}%27)"
74-
)
75-
execution_count = score_execution.get(
76-
"count"
77-
) # Exception catch location
77+
)
78+
execution_count = score_execution.get("count") # Exception catch location
7879
if execution_count == 1:
7980
execution_id = score_execution.get("items", [0], ["id"])
8081
deleted_score_execution = cls.delete_execution(execution_id)

tests/unit/test_score_execution.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from sasctl.core import RestObj, VersionInfo
2424
from sasctl._services.score_definitions import ScoreDefinitions as sd
2525

26+
2627
def test_create_score_execution():
2728
"""
2829
Test Cases:
@@ -32,9 +33,9 @@ def test_create_score_execution():
3233
- Valid execution id?
3334
3435
-Valid count key?
35-
36+
3637
"""
37-
38+
3839
with mock.patch(
3940
"sasctl._services.score_definitions.ScoreDefinitions.get_definition"
4041
) as get_definition:
@@ -45,4 +46,4 @@ def test_create_score_execution():
4546
"sasctl._services.score_execution.ScoreExecution.delete_execution"
4647
) as delete_execution:
4748
exit()
48-
#raise HTTP error?
49+
# raise HTTP error?

tests/unit/test_score_executions.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from sasctl.core import RestObj, VersionInfo
2424
from sasctl._services.score_definitions import ScoreDefinitions as sd
2525

26+
2627
def test_create_score_execution():
2728
"""
2829
Test Cases:
@@ -32,9 +33,9 @@ def test_create_score_execution():
3233
- Valid execution id?
3334
3435
-Valid count key?
35-
36+
3637
"""
37-
38+
3839
with mock.patch(
3940
"sasctl._services.score_definitions.ScoreDefinitions.get_definition"
4041
) as get_definition:
@@ -45,4 +46,4 @@ def test_create_score_execution():
4546
"sasctl._services.score_execution.ScoreExecution.delete_execution"
4647
) as delete_execution:
4748
exit()
48-
#raise HTTP error?
49+
# raise HTTP error?

0 commit comments

Comments
 (0)