Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
desertaxle committed Feb 7, 2025
1 parent d82bccb commit bc8e8d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/prefect/deployments/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ async def _create(
return deployment_id

async def _update(self, deployment_id: UUID, client: PrefectClient):
parameter_openapi_schema=self._parameter_openapi_schema.model_dump(
parameter_openapi_schema = self._parameter_openapi_schema.model_dump(
exclude_unset=True
)
await client.update_deployment(
Expand All @@ -359,7 +359,7 @@ async def _update(self, deployment_id: UUID, client: PrefectClient):
mode="json",
exclude_unset=True,
exclude={"storage", "name", "flow_name", "triggers"},
)
),
),
)

Expand Down
12 changes: 7 additions & 5 deletions tests/runner/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,9 @@ async def test_add_flows_to_runner(self, prefect_client: PrefectClient):
assert deployment_2.name == "test_runner"
assert deployment_2.schedules[0].schedule.cron == "* * * * *"

async def test_add_flow_to_runner_always_updates_openapi_schema(self, prefect_client: PrefectClient):
async def test_add_flow_to_runner_always_updates_openapi_schema(
self, prefect_client: PrefectClient
):
"""Runner.add should create a deployment for the flow passed to it"""
runner = Runner()

Expand All @@ -438,8 +440,8 @@ def one(num: int):
deployment = await prefect_client.read_deployment(deployment_id)

assert deployment.name == "test-openapi"
assert deployment.description == 'None'
assert set(deployment.parameter_openapi_schema['properties'].keys()) == {'num'}
assert deployment.description == "None"
assert set(deployment.parameter_openapi_schema["properties"].keys()) == {"num"}

@flow(name="one")
def two(num: int):
Expand All @@ -451,7 +453,7 @@ def two(num: int):

assert deployment.name == "test-openapi"
assert deployment.description == "description now"
assert set(deployment.parameter_openapi_schema['properties'].keys()) == {'num'}
assert set(deployment.parameter_openapi_schema["properties"].keys()) == {"num"}

@flow(name="one")
def three(name: str):
Expand All @@ -462,7 +464,7 @@ def three(name: str):

assert deployment.name == "test-openapi"
assert deployment.description is None
assert set(deployment.parameter_openapi_schema['properties'].keys()) == {'name'}
assert set(deployment.parameter_openapi_schema["properties"].keys()) == {"name"}

@pytest.mark.parametrize(
"kwargs",
Expand Down

0 comments on commit bc8e8d4

Please # to comment.