8000 Fix Invalid noqa Usage in Step Functions TestState Preprocessor (#12368) · localstack/localstack@4f0b6ff · GitHub
[go: up one dir, main page]

Skip to content

Commit 4f0b6ff

Browse files
authored
Fix Invalid noqa Usage in Step Functions TestState Preprocessor (#12368)
1 parent 1a6f9dd commit 4f0b6ff

File tree

1 file changed

+8
-3
lines changed
  • localstack-core/localstack/services/stepfunctions/asl/parse/test_state

1 file changed

+8
-3
lines changed

localstack-core/localstack/services/stepfunctions/asl/parse/test_state/preprocessor.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,25 @@ def _decorated_updates_inspection_data(method, inspection_data_key: InspectionDa
4949
def wrapper(env: TestStateEnvironment, *args, **kwargs):
5050
method(env, *args, **kwargs)
5151
result = to_json_str(env.stack[-1])
52-
env.inspection_data[inspection_data_key.value] = result # noqa: we know that the here value is a supported inspection data field by design.
52+
# We know that the enum value used here corresponds to a supported inspection data field by design.
53+
env.inspection_data[inspection_data_key.value] = result # noqa
5354

5455
return wrapper
5556

5657

5758
def _decorate_state_field(state_field: CommonStateField) -> None:
5859
if isinstance(state_field, ExecutionState):
5960
state_field._eval_execution = _decorated_updates_inspection_data(
60-
method=state_field._eval_execution, # noqa: as part of the decoration we access this protected member.
61+
# As part of the decoration process, we intentionally access this protected member
62+
# to facilitate the decorator's functionality.
63+
method=state_field._eval_execution, # noqa
6164
inspection_data_key=InspectionDataKey.RESULT,
6265
)
6366
elif isinstance(state_field, StateChoice):
6467
state_field._eval_body = _decorated_updated_choice_inspection_data(
65-
method=state_field._eval_body # noqa: as part of the decoration we access this protected member.
68+
# As part of the decoration process, we intentionally access this protected member
69+
# to facilitate the decorator's functionality.
70+
method=state_field._eval_body # noqa
6671
)
6772

6873

0 commit comments

Comments
 (0)
0