Skip to content

Commit

Permalink
Admin: Ruff formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
bblommers committed Dec 29, 2024
1 parent d773bb2 commit e151ffc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions moto/awslambda/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -989,9 +989,13 @@ def _invoke_lambda(self, event: Optional[str] = None) -> Tuple[str, bool, str]:
container = exit_code = None
log_config = docker.types.LogConfig(type=docker.types.LogConfig.types.JSON)

with _DockerDataVolumeContext(
self
) as data_vol, _DockerDataVolumeLayerContext(self) as layer_context:
# Ruff formats it like this, which is nice
# But the last mypy that supports Python 3.8 doesn't understand this syntax - hence the type: ignore
# We can remove it the moment we drop Python 3.8
with (
_DockerDataVolumeContext(self) as data_vol, # type: ignore[syntax]
_DockerDataVolumeLayerContext(self) as layer_context,
):
try:
run_kwargs: Dict[str, Any] = dict()
network_name = settings.moto_network_name()
Expand Down
2 changes: 1 addition & 1 deletion moto/stepfunctions/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def update_state_machine(self) -> TYPE_RESPONSE:
)
response = {"updateDate": state_machine.update_date}
if publish:
response["stateMachineVersionArn"] = state_machine.latest_version.arn # type: ignore
response["stateMachineVersionArn"] = state_machine.latest_version.arn # type: ignore
return 200, {}, json.dumps(response)

def list_tags_for_resource(self) -> TYPE_RESPONSE:
Expand Down

0 comments on commit e151ffc

Please sign in to comment.