Skip to content

Commit

Permalink
SFN: Flatten source tree to reduce change of hitting the MAX_PATH in …
Browse files Browse the repository at this point in the history
…Windows (#7550)
  • Loading branch information
bblommers authored Apr 2, 2024
1 parent d407add commit 3120ea1
Show file tree
Hide file tree
Showing 107 changed files with 242 additions and 242 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from moto.stepfunctions.parser.asl.component.common.flow.next import Next
from moto.stepfunctions.parser.asl.component.eval_component import EvalComponent
from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison import (
from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison import (
Comparison,
)
from moto.stepfunctions.parser.asl.eval.environment import Environment
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Final, List

from moto.stepfunctions.parser.asl.component.component import Component
from moto.stepfunctions.parser.asl.component.state.state_choice.choice_rule import (
from moto.stepfunctions.parser.asl.component.state.choice.choice_rule import (
ChoiceRule,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from typing import Any, Final, List

from moto.stepfunctions.parser.asl.antlr.runtime.ASLLexer import ASLLexer
from moto.stepfunctions.parser.asl.component.state.state_choice.choice_rule import (
from moto.stepfunctions.parser.asl.component.state.choice.choice_rule import (
ChoiceRule,
)
from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison import (
from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison import (
Comparison,
)
from moto.stepfunctions.parser.asl.eval.environment import Environment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
from typing import Final

from moto.stepfunctions.parser.asl.component.eval_component import EvalComponent
from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison_operator_type import (
from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison_operator_type import (
ComparisonOperatorType,
)
from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.operator.factory import (
from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.factory import (
OperatorFactory,
)
from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.operator.operator import (
from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.operator import (
Operator,
)
from moto.stepfunctions.parser.asl.eval.environment import Environment
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from typing import Final

from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison import (
from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison import (
Comparison,
)
from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison_func import (
from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison_func import (
ComparisonFunc,
)
from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.variable import (
from moto.stepfunctions.parser.asl.component.state.choice.comparison.variable import (
Variable,
)
from moto.stepfunctions.parser.asl.eval.environment import Environment
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison_operator_type import (
ComparisonOperatorType,
)
from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.implementations.boolean_equals import * # noqa
from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.implementations.is_operator import * # noqa
from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.implementations.numeric import * # noqa
from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.implementations.string_operators import * # noqa
from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.implementations.timestamp_operators import * # noqa
from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.operator import (
Operator,
)


class OperatorFactory:
@staticmethod
def get(typ: ComparisonOperatorType) -> Operator:
op = Operator.get((str(typ)))
if op is None:
raise NotImplementedError(f"{typ} is not supported.")
return op
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from typing import Any

from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison_operator_type import (
from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison_operator_type import (
ComparisonOperatorType,
)
from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.operator.operator import (
from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.operator import (
Operator,
)
from moto.stepfunctions.parser.asl.eval.environment import Environment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
import logging
from typing import Any, Final, Optional

from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison_operator_type import (
from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison_operator_type import (
ComparisonOperatorType,
)
from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.operator.operator import (
from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.operator import (
Operator,
)
from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.variable import (
from moto.stepfunctions.parser.asl.component.state.choice.comparison.variable import (
NoSuchVariable,
)
from moto.stepfunctions.parser.asl.eval.environment import Environment
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from typing import Any

from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison_operator_type import (
from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison_operator_type import (
ComparisonOperatorType,
)
from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.operator.operator import (
from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.operator import (
Operator,
)
from moto.stepfunctions.parser.asl.eval.environment import Environment
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import fnmatch
from typing import Any

from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison_operator_type import (
from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison_operator_type import (
ComparisonOperatorType,
)
from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.operator.operator import (
from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.operator import (
Operator,
)
from moto.stepfunctions.parser.asl.eval.environment import Environment
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from typing import Any

from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.comparison_operator_type import (
from moto.stepfunctions.parser.asl.component.state.choice.comparison.comparison_operator_type import (
ComparisonOperatorType,
)
from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.operator.implementations.is_operator import (
from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.implementations.is_operator import (
IsTimestamp,
)
from moto.stepfunctions.parser.asl.component.state.state_choice.comparison.operator.operator import (
from moto.stepfunctions.parser.asl.component.state.choice.comparison.operator.operator import (
Operator,
)
from moto.stepfunctions.parser.asl.eval.environment import Environment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
from moto.stepfunctions.parser.api import HistoryEventType
from moto.stepfunctions.parser.asl.component.common.flow.end import End
from moto.stepfunctions.parser.asl.component.common.flow.next import Next
from moto.stepfunctions.parser.asl.component.state.state import CommonStateField
from moto.stepfunctions.parser.asl.component.state.state_choice.choices_decl import (
from moto.stepfunctions.parser.asl.component.state.choice.choices_decl import (
ChoicesDecl,
)
from moto.stepfunctions.parser.asl.component.state.state_choice.default_decl import (
from moto.stepfunctions.parser.asl.component.state.choice.default_decl import (
DefaultDecl,
)
from moto.stepfunctions.parser.asl.component.state.state import CommonStateField
from moto.stepfunctions.parser.asl.component.state.state_props import StateProps
from moto.stepfunctions.parser.asl.eval.environment import Environment

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import abc
from typing import Final

from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.resource import (
from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.resource import (
ServiceResource,
)
from moto.stepfunctions.parser.asl.eval.environment import Environment
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.resource_eval.resource_eval import (
from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.eval.resource_eval import (
ResourceEval,
)
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.resource_eval.resource_eval_s3 import (
from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.eval.resource_eval_s3 import (
ResourceEvalS3,
)
from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.resource import (
from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.resource import (
Resource,
ServiceResource,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

from typing import Callable, Final

from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.resource_eval.resource_eval import (
from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.eval.resource_eval import (
ResourceEval,
)
from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.resource import (
from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.resource import (
ResourceRuntimePart,
)
from moto.stepfunctions.parser.asl.eval.environment import Environment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
from moto.stepfunctions.parser.asl.component.common.error_name.states_error_name_type import (
StatesErrorNameType,
)
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.reader_config.reader_config_decl import (
from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.eval.resource_output_transformer.transformer import (
ResourceOutputTransformer,
)
from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.reader_config.reader_config_decl import (
CSVHeaderLocationOutput,
ReaderConfigOutput,
)
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.resource_eval.resource_output_transformer.resource_output_transformer import (
ResourceOutputTransformer,
)
from moto.stepfunctions.parser.asl.eval.environment import Environment
from moto.stepfunctions.parser.asl.eval.event.event_detail import EventDetails

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.eval.resource_output_transformer.transformer import (
ResourceOutputTransformer,
)
from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.eval.resource_output_transformer.transformer_csv import (
ResourceOutputTransformerCSV,
)
from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.eval.resource_output_transformer.transformer_json import (
ResourceOutputTransformerJson,
)
from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.reader_config.input_type import (
InputType,
InputTypeValue,
)


def resource_output_transformer_for(input_type: InputType) -> ResourceOutputTransformer:
if input_type.input_type_value == InputTypeValue.CSV:
return ResourceOutputTransformerCSV()
elif input_type.input_type_value == InputTypeValue.JSON:
return ResourceOutputTransformerJson()
else:
raise ValueError(f"Unknown InputType value: '{input_type.input_type_value}'.")
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
from moto.stepfunctions.parser.asl.component.common.error_name.states_error_name_type import (
StatesErrorNameType,
)
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.reader_config.reader_config_decl import (
ReaderConfigOutput,
)
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.resource_eval.resource_output_transformer.resource_output_transformer import (
from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.eval.resource_output_transformer.transformer import (
ResourceOutputTransformer,
)
from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.reader_config.reader_config_decl import (
ReaderConfigOutput,
)
from moto.stepfunctions.parser.asl.eval.environment import Environment
from moto.stepfunctions.parser.asl.eval.event.event_detail import EventDetails

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@

from moto.stepfunctions.parser.asl.component.common.parameters import Parameters
from moto.stepfunctions.parser.asl.component.eval_component import EvalComponent
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.reader_config.reader_config_decl import (
ReaderConfig,
)
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.resource_eval.resource_eval import (
from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.eval.resource_eval import (
ResourceEval,
)
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.resource_eval.resource_eval_factory import (
from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.eval.resource_eval_factory import (
resource_eval_for,
)
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.resource_eval.resource_output_transformer.resource_output_transformer import (
from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.eval.resource_output_transformer.transformer import (
ResourceOutputTransformer,
)
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.resource_eval.resource_output_transformer.resource_output_transformer_factory import (
from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.eval.resource_output_transformer.transformer_factory import (
resource_output_transformer_for,
)
from moto.stepfunctions.parser.asl.component.state.state_execution.state_task.service.resource import (
from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.reader_config.reader_config_decl import (
ReaderConfig,
)
from moto.stepfunctions.parser.asl.component.state.exec.state_task.service.resource import (
Resource,
)
from moto.stepfunctions.parser.asl.eval.environment import Environment
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
from typing import Final, List, Optional, TypedDict

from moto.stepfunctions.parser.asl.component.eval_component import EvalComponent
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.reader_config.csv_header_location import (
from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.reader_config.csv_header_location import (
CSVHeaderLocation,
)
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.reader_config.csv_headers import (
from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.reader_config.csv_headers import (
CSVHeaders,
)
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.reader_config.input_type import (
from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.reader_config.input_type import (
InputType,
)
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.reader_config.max_items_decl import (
from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.reader_config.max_items_decl import (
MaxItems,
MaxItemsDecl,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@
)
from moto.stepfunctions.parser.asl.component.common.flow.start_at import StartAt
from moto.stepfunctions.parser.asl.component.program.program import Program
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.item_reader.item_reader_decl import (
from moto.stepfunctions.parser.asl.component.state.exec.state_map.item_reader.item_reader_decl import (
ItemReader,
)
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.inline_iteration_component import (
from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.inline_iteration_component import (
InlineIterationComponent,
)
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.itemprocessor.map_run_record import (
from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.itemprocessor.map_run_record import (
MapRunRecord,
)
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.iteration_worker import (
from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.iteration_worker import (
IterationWorker,
)
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.job import (
from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.job import (
Job,
JobPool,
)
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.max_concurrency import (
from moto.stepfunctions.parser.asl.component.state.exec.state_map.max_concurrency import (
MaxConcurrency,
)
from moto.stepfunctions.parser.asl.component.states import States
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
from moto.stepfunctions.parser.asl.component.common.comment import Comment
from moto.stepfunctions.parser.asl.component.common.flow.start_at import StartAt
from moto.stepfunctions.parser.asl.component.program.program import Program
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.iteration_component import (
from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.iteration_component import (
IterationComponent,
)
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.iteration_worker import (
from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.iteration_worker import (
IterationWorker,
)
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.iteration.job import (
from moto.stepfunctions.parser.asl.component.state.exec.state_map.iteration.job import (
Job,
JobPool,
)
from moto.stepfunctions.parser.asl.component.state.state_execution.state_map.max_concurrency import (
from moto.stepfunctions.parser.asl.component.state.exec.state_map.max_concurrency import (
MaxConcurrency,
)
from moto.stepfunctions.parser.asl.component.states import States
Expand Down
Loading

0 comments on commit 3120ea1

Please sign in to comment.