-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade cargo-dist from 0.22.1 => 0.25.2-prerelease.3 #14456
Conversation
0184ccd
to
893569c
Compare
|
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
TC001 | 352 | 352 | 0 | 0 | 0 |
TCH001 | 352 | 0 | 352 | 0 | 0 |
TC003 | 198 | 198 | 0 | 0 | 0 |
TCH003 | 198 | 0 | 198 | 0 | 0 |
TC002 | 147 | 147 | 0 | 0 | 0 |
TCH002 | 147 | 0 | 147 | 0 | 0 |
UP006 | 145 | 145 | 0 | 0 | 0 |
UP035 | 71 | 71 | 0 | 0 | 0 |
UP031 | 62 | 62 | 0 | 0 | 0 |
RUF101 | 46 | 46 | 0 | 0 | 0 |
PT004 | 3 | 0 | 3 | 0 | 0 |
RUF200 | 2 | 2 | 0 | 0 | 0 |
D212 | 2 | 1 | 1 | 0 | 0 |
TC005 | 2 | 2 | 0 | 0 | 0 |
TCH005 | 2 | 0 | 2 | 0 | 0 |
RUF100 | 1 | 1 | 0 | 0 | 0 |
TCH004 | 1 | 0 | 1 | 0 | 0 |
Linter (preview)
ℹ️ ecosystem check detected linter changes. (+963 -700 violations, +0 -0 fixes in 8 projects; 46 projects unchanged)
apache/airflow (+116 -110 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL
+ airflow/__main__.py:25:22: TC003 Move standard library import `argparse.Namespace` into a type-checking block - airflow/__main__.py:25:22: TCH003 Move standard library import `argparse.Namespace` into a type-checking block + airflow/api_connexion/schemas/asset_schema.py:19:22: TC003 Move standard library import `datetime.datetime` into a type-checking block - airflow/api_connexion/schemas/asset_schema.py:19:22: TCH003 Move standard library import `datetime.datetime` into a type-checking block + airflow/api_fastapi/common/parameters.py:21:22: TC003 Move standard library import `datetime.datetime` into a type-checking block - airflow/api_fastapi/common/parameters.py:21:22: TCH003 Move standard library import `datetime.datetime` into a type-checking block + airflow/api_fastapi/common/router.py:20:18: TC003 Move standard library import `enum.Enum` into a type-checking block - airflow/api_fastapi/common/router.py:20:18: TCH003 Move standard library import `enum.Enum` into a type-checking block + airflow/api_fastapi/common/types.py:19:22: TC003 Move standard library import `datetime.timedelta` into a type-checking block - airflow/api_fastapi/common/types.py:19:22: TCH003 Move standard library import `datetime.timedelta` into a type-checking block ... 216 additional changes omitted for project
apache/superset (+321 -321 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL
+ superset/advanced_data_type/api.py:28:47: TC001 Move application import `superset.advanced_data_type.types.AdvancedDataTypeResponse` into a type-checking block - superset/advanced_data_type/api.py:28:47: TCH001 Move application import `superset.advanced_data_type.types.AdvancedDataTypeResponse` into a type-checking block + superset/async_events/async_query_manager.py:26:41: TC002 Move third-party import `flask_caching.backends.base.BaseCache` into a type-checking block - superset/async_events/async_query_manager.py:26:41: TCH002 Move third-party import `flask_caching.backends.base.BaseCache` into a type-checking block + superset/charts/data/api.py:43:45: TC001 Move application import `superset.connectors.sqla.models.BaseDatasource` into a type-checking block - superset/charts/data/api.py:43:45: TCH001 Move application import `superset.connectors.sqla.models.BaseDatasource` into a type-checking block + superset/charts/data/api.py:47:37: TC001 Move application import `superset.models.sql_lab.Query` into a type-checking block - superset/charts/data/api.py:47:37: TCH001 Move application import `superset.models.sql_lab.Query` into a type-checking block + superset/cli/test_db.py:45:43: TC001 Move application import `superset.db_engine_specs.base.BaseEngineSpec` into a type-checking block - superset/cli/test_db.py:45:43: TCH001 Move application import `superset.db_engine_specs.base.BaseEngineSpec` into a type-checking block + superset/commands/annotation_layer/annotation/create.py:18:22: TC003 Move standard library import `datetime.datetime` into a type-checking block - superset/commands/annotation_layer/annotation/create.py:18:22: TCH003 Move standard library import `datetime.datetime` into a type-checking block + superset/commands/annotation_layer/annotation/create.py:23:25: TC002 Move third-party import `marshmallow.ValidationError` into a type-checking block - superset/commands/annotation_layer/annotation/create.py:23:25: TCH002 Move third-party import `marshmallow.ValidationError` into a type-checking block + superset/commands/annotation_layer/annotation/delete.py:27:41: TC001 Move application import `superset.models.annotations.Annotation` into a type-checking block - superset/commands/annotation_layer/annotation/delete.py:27:41: TCH001 Move application import `superset.models.annotations.Annotation` into a type-checking block + superset/commands/annotation_layer/annotation/update.py:18:22: TC003 Move standard library import `datetime.datetime` into a type-checking block - superset/commands/annotation_layer/annotation/update.py:18:22: TCH003 Move standard library import `datetime.datetime` into a type-checking block + superset/commands/annotation_layer/annotation/update.py:23:25: TC002 Move third-party import `marshmallow.ValidationError` into a type-checking block ... 623 additional changes omitted for project
bokeh/bokeh (+232 -232 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL
+ release/build.py:18:21: TC001 Move application import `.config.Config` into a type-checking block - release/build.py:18:21: TCH001 Move application import `.config.Config` into a type-checking block + release/build.py:19:21: TC001 Move application import `.system.System` into a type-checking block - release/build.py:19:21: TCH001 Move application import `.system.System` into a type-checking block + release/checks.py:19:21: TC001 Move application import `.config.Config` into a type-checking block - release/checks.py:19:21: TCH001 Move application import `.config.Config` into a type-checking block + release/checks.py:20:23: TC001 Move application import `.pipeline.StepType` into a type-checking block - release/checks.py:20:23: TCH001 Move application import `.pipeline.StepType` into a type-checking block + release/checks.py:21:21: TC001 Move application import `.system.System` into a type-checking block - release/checks.py:21:21: TCH001 Move application import `.system.System` into a type-checking block + release/credentials.py:24:21: TC001 Move application import `.config.Config` into a type-checking block ... 189 additional changes omitted for rule TC001 - release/credentials.py:24:21: TCH001 Move application import `.config.Config` into a type-checking block ... 189 additional changes omitted for rule TCH001 + src/bokeh/application/handlers/code.py:41:19: TC003 Move standard library import `types.ModuleType` into a type-checking block ... 451 additional changes omitted for project
ibis-project/ibis (+42 -0 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview
+ ibis/backends/oracle/tests/test_client.py:3:36: RUF101 [*] `TCH003` is a redirect to `TC003` + ibis/backends/polars/rewrites.py:10:50: RUF101 [*] `TCH001` is a redirect to `TC001` + ibis/backends/sql/rewrites.py:17:57: RUF101 [*] `TCH001` is a redirect to `TC001` + ibis/backends/sql/rewrites.py:21:50: RUF101 [*] `TCH001` is a redirect to `TC001` + ibis/common/grounds.py:29:57: RUF101 [*] `TCH001` is a redirect to `TC001` + ibis/common/selectors.py:8:50: RUF101 [*] `TCH001` is a redirect to `TC001` + ibis/config.py:3:47: RUF101 [*] `TCH003` is a redirect to `TC003` + ibis/expr/builders.py:16:53: RUF101 [*] `TCH001` is a redirect to `TC001` + ibis/expr/builders.py:17:50: RUF101 [*] `TCH001` is a redirect to `TC001` + ibis/expr/datatypes/tests/test_core.py:3:26: RUF101 [*] `TCH003` is a redirect to `TC003` ... 32 additional changes omitted for project
latchbio/latch (+6 -6 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview
+ src/latch/ldata/_transfer/upload.py:10:38: TC003 Move standard library import `multiprocessing.managers.DictProxy` into a type-checking block - src/latch/ldata/_transfer/upload.py:10:38: TCH003 Move standard library import `multiprocessing.managers.DictProxy` into a type-checking block + src/latch/ldata/_transfer/upload.py:10:49: TC003 Move standard library import `multiprocessing.managers.ListProxy` into a type-checking block - src/latch/ldata/_transfer/upload.py:10:49: TCH003 Move standard library import `multiprocessing.managers.ListProxy` into a type-checking block + src/latch/ldata/_transfer/upload.py:12:19: TC003 Move standard library import `queue.Queue` into a type-checking block - src/latch/ldata/_transfer/upload.py:12:19: TCH003 Move standard library import `queue.Queue` into a type-checking block + src/latch/registry/record.py:18:49: TC001 Move application import `latch.registry.upstream_types.types.DBType` into a type-checking block - src/latch/registry/record.py:18:49: TCH001 Move application import `latch.registry.upstream_types.types.DBType` into a type-checking block + src/latch_cli/services/register/utils.py:5:8: TC003 Move standard library import `io` into a type-checking block - src/latch_cli/services/register/utils.py:5:8: TCH003 Move standard library import `io` into a type-checking block ... 2 additional changes omitted for project
lnbits/lnbits (+216 -0 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview
+ lnbits/app.py:257:6: UP006 Use `list` instead of `List` for type annotation + lnbits/app.py:9:1: UP035 `typing.List` is deprecated, use `list` instead + lnbits/commands.py:235:23: UP006 Use `list` instead of `List` for type annotation + lnbits/commands.py:465:6: UP006 Use `tuple` instead of `Tuple` for type annotation + lnbits/commands.py:494:6: UP006 Use `tuple` instead of `Tuple` for type annotation + lnbits/commands.py:6:1: UP035 `typing.List` is deprecated, use `list` instead + lnbits/commands.py:6:1: UP035 `typing.Tuple` is deprecated, use `tuple` instead + lnbits/core/crud.py:1018:6: UP006 Use `list` instead of `List` for type annotation + lnbits/core/crud.py:1235:43: UP006 Use `list` instead of `List` for type annotation ... 140 additional changes omitted for rule UP006 + lnbits/core/crud.py:4:1: UP035 `typing.Dict` is deprecated, use `dict` instead ... 206 additional changes omitted for project
pandas-dev/pandas (+0 -1 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview
- pandas/core/dtypes/dtypes.py:76:23: TCH004 Move import `pyarrow` out of type-checking block. Import is used for more than type hinting.
zulip/zulip (+30 -30 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL
+ confirmation/models.py:36:9: TC001 Move application import `zilencer.models.PreregistrationRemoteRealmBillingUser` into a type-checking block - confirmation/models.py:36:9: TCH001 Move application import `zilencer.models.PreregistrationRemoteRealmBillingUser` into a type-checking block + confirmation/models.py:37:9: TC001 Move application import `zilencer.models.PreregistrationRemoteServerBillingUser` into a type-checking block - confirmation/models.py:37:9: TCH001 Move application import `zilencer.models.PreregistrationRemoteServerBillingUser` into a type-checking block + zerver/actions/message_edit.py:68:30: TC001 Move application import `zerver.lib.types.EditHistoryEvent` into a type-checking block - zerver/actions/message_edit.py:68:30: TCH001 Move application import `zerver.lib.types.EditHistoryEvent` into a type-checking block + zerver/lib/bot_lib.py:3:29: TC003 Move standard library import `collections.abc.Callable` into a type-checking block - zerver/lib/bot_lib.py:3:29: TCH003 Move standard library import `collections.abc.Callable` into a type-checking block + zerver/lib/logging_util.py:13:25: TC002 Move third-party import `django.http.HttpRequest` into a type-checking block - zerver/lib/logging_util.py:13:25: TCH002 Move third-party import `django.http.HttpRequest` into a type-checking block ... 50 additional changes omitted for project
... Truncated remaining completed project reports due to GitHub comment length restrictions
Changes by rule (13 rules affected)
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
TC001 | 352 | 352 | 0 | 0 | 0 |
TCH001 | 352 | 0 | 352 | 0 | 0 |
TC003 | 198 | 198 | 0 | 0 | 0 |
TCH003 | 198 | 0 | 198 | 0 | 0 |
TC002 | 147 | 147 | 0 | 0 | 0 |
TCH002 | 147 | 0 | 147 | 0 | 0 |
UP006 | 145 | 145 | 0 | 0 | 0 |
UP035 | 71 | 71 | 0 | 0 | 0 |
RUF101 | 46 | 46 | 0 | 0 | 0 |
RUF200 | 2 | 2 | 0 | 0 | 0 |
TC005 | 2 | 2 | 0 | 0 | 0 |
TCH005 | 2 | 0 | 2 | 0 | 0 |
TCH004 | 1 | 0 | 1 | 0 | 0 |
Formatter (stable)
ℹ️ ecosystem check detected format changes. (+111 -85 lines in 16 files in 4 projects; 50 projects unchanged)
aws/aws-sam-cli (+34 -30 lines across 4 files)
tests/integration/pipeline/test_init_command.py~L98
self.assertEqual(init_process_execute.process.returncode, 0)
- with open(EXPECTED_JENKINS_FILE_PATH, "r") as expected, open(
- os.path.join(".aws-sam", "pipeline", "generated-files", "Jenkinsfile"), "r"
- ) as output:
+ with (
+ open(EXPECTED_JENKINS_FILE_PATH, "r") as expected,
+ open(os.path.join(".aws-sam", "pipeline", "generated-files", "Jenkinsfile"), "r") as output,
+ ):
self.assertEqual(expected.read(), output.read())
# also check the Jenkinsfile is not overridden
tests/unit/commands/samconfig/test_samconfig.py~L1066
}
# NOTE: Because we don't load the full Click BaseCommand here, this is mounted as top-level command
- with samconfig_parameters(
- ["start-lambda"], self.scratch_dir, **config_values
- ) as config_path, tempfile.NamedTemporaryFile() as key_file, tempfile.NamedTemporaryFile() as cert_file:
+ with (
+ samconfig_parameters(["start-lambda"], self.scratch_dir, **config_values) as config_path,
+ tempfile.NamedTemporaryFile() as key_file,
+ tempfile.NamedTemporaryFile() as cert_file,
+ ):
from samcli.commands.local.start_lambda.cli import cli
LOG.debug(Path(config_path).read_text())
tests/unit/commands/samconfig/test_samconfig.py~L1171
}
# NOTE: Because we don't load the full Click BaseCommand here, this is mounted as top-level command
- with samconfig_parameters(
- ["start-lambda"], self.scratch_dir, **config_values
- ) as config_path, tempfile.NamedTemporaryFile() as key_file, tempfile.NamedTemporaryFile() as cert_file:
+ with (
+ samconfig_parameters(["start-lambda"], self.scratch_dir, **config_values) as config_path,
+ tempfile.NamedTemporaryFile() as key_file,
+ tempfile.NamedTemporaryFile() as cert_file,
+ ):
from samcli.commands.local.start_lambda.cli import cli
LOG.debug(Path(config_path).read_text())
tests/unit/lib/build_module/test_build_strategy.py~L747
def test_will_call_incremental_build_strategy(self, mocked_read, mocked_write, runtime):
build_definition = FunctionBuildDefinition(runtime, "codeuri", None, "package_type", X86_64, {}, "handler")
self.build_graph.put_function_build_definition(build_definition, Mock(full_path="function_full_path"))
- with patch.object(
- self.build_strategy, "_incremental_build_strategy"
- ) as patched_incremental_build_strategy, patch.object(
- self.build_strategy, "_cached_build_strategy"
- ) as patched_cached_build_strategy:
+ with (
+ patch.object(self.build_strategy, "_incremental_build_strategy") as patched_incremental_build_strategy,
+ patch.object(self.build_strategy, "_cached_build_strategy") as patched_cached_build_strategy,
+ ):
self.build_strategy.build()
patched_incremental_build_strategy.build_single_function_definition.assert_called_with(build_definition)
tests/unit/lib/build_module/test_build_strategy.py~L767
def test_will_call_cached_build_strategy(self, mocked_read, mocked_write, runtime):
build_definition = FunctionBuildDefinition(runtime, "codeuri", None, "package_type", X86_64, {}, "handler")
self.build_graph.put_function_build_definition(build_definition, Mock(full_path="function_full_path"))
- with patch.object(
- self.build_strategy, "_incremental_build_strategy"
- ) as patched_incremental_build_strategy, patch.object(
- self.build_strategy, "_cached_build_strategy"
- ) as patched_cached_build_strategy:
+ with (
+ patch.object(self.build_strategy, "_incremental_build_strategy") as patched_incremental_build_strategy,
+ patch.object(self.build_strategy, "_cached_build_strategy") as patched_cached_build_strategy,
+ ):
self.build_strategy.build()
patched_cached_build_strategy.build_single_function_definition.assert_called_with(build_definition)
tests/unit/lib/build_module/test_build_strategy.py~L841
build_definition = FunctionBuildDefinition(runtime, "codeuri", None, "package_type", X86_64, {}, "handler")
self.build_graph.put_function_build_definition(build_definition, Mock(full_path="function_full_path"))
- with patch.object(
- build_strategy, "_incremental_build_strategy"
- ) as patched_incremental_build_strategy, patch.object(
- build_strategy, "_cached_build_strategy"
- ) as patched_cached_build_strategy:
+ with (
+ patch.object(build_strategy, "_incremental_build_strategy") as patched_incremental_build_strategy,
+ patch.object(build_strategy, "_cached_build_strategy") as patched_cached_build_strategy,
+ ):
build_strategy.build()
if not use_container:
tests/unit/lib/remote_invoke/test_remote_invoke_executors.py~L79
given_output_format = "text"
test_execution_info = RemoteInvokeExecutionInfo(given_payload, None, given_parameters, given_output_format)
- with patch.object(self.boto_action_executor, "_execute_action") as patched_execute_action, patch.object(
- self.boto_action_executor, "_execute_action_file"
- ) as patched_execute_action_file:
+ with (
+ patch.object(self.boto_action_executor, "_execute_action") as patched_execute_action,
+ patch.object(self.boto_action_executor, "_execute_action_file") as patched_execute_action_file,
+ ):
given_result = Mock()
patched_execute_action.return_value = given_result
tests/unit/lib/remote_invoke/test_remote_invoke_executors.py~L96
given_output_format = "json"
test_execution_info = RemoteInvokeExecutionInfo(None, given_payload_file, given_parameters, given_output_format)
- with patch.object(self.boto_action_executor, "_execute_action") as patched_execute_action, patch.object(
- self.boto_action_executor, "_execute_action_file"
- ) as patched_execute_action_file:
+ with (
+ patch.object(self.boto_action_executor, "_execute_action") as patched_execute_action,
+ patch.object(self.boto_action_executor, "_execute_action_file") as patched_execute_action_file,
+ ):
given_result = Mock()
patched_execute_action_file.return_value = given_result
langchain-ai/langchain (+32 -23 lines across 5 files)
libs/community/tests/unit_tests/document_loaders/test_mongodb.py~L50
mock_collection.find = mock_find
mock_collection.count_documents = mock_count_documents
- with patch(
- "motor.motor_asyncio.AsyncIOMotorClient", return_value=MagicMock()
- ), patch(
- "langchain_community.document_loaders.mongodb.MongodbLoader.aload",
- new=mock_async_load,
+ with (
+ patch("motor.motor_asyncio.AsyncIOMotorClient", return_value=MagicMock()),
+ patch(
+ "langchain_community.document_loaders.mongodb.MongodbLoader.aload",
+ new=mock_async_load,
+ ),
):
loader = MongodbLoader(
"mongodb://localhost:27017",
libs/community/tests/unit_tests/tools/audio/test_tools.py~L44
def test_huggingface_tts_run_with_requests_mock() -> None:
os.environ["HUGGINGFACE_API_KEY"] = "foo"
- with tempfile.TemporaryDirectory() as tmp_dir, patch(
- "uuid.uuid4"
- ) as mock_uuid, patch("requests.post") as mock_inference, patch(
- "builtins.open", mock_open()
- ) as mock_file:
+ with (
+ tempfile.TemporaryDirectory() as tmp_dir,
+ patch("uuid.uuid4") as mock_uuid,
+ patch("requests.post") as mock_inference,
+ patch("builtins.open", mock_open()) as mock_file,
+ ):
input_query = "Dummy input"
mock_uuid_value = uuid.UUID("00000000-0000-0000-0000-000000000000")
libs/community/tests/unit_tests/vectorstores/test_azure_search.py~L220
]
ids_provided = [i.metadata.get("id") for i in documents]
- with patch.object(
- SearchClient, "upload_documents", mock_upload_documents
- ), patch.object(SearchIndexClient, "get_index", mock_default_index):
+ with (
+ patch.object(SearchClient, "upload_documents", mock_upload_documents),
+ patch.object(SearchIndexClient, "get_index", mock_default_index),
+ ):
vector_store = create_vector_store()
ids_used_at_upload = vector_store.add_documents(documents, ids=ids_provided)
assert len(ids_provided) == len(ids_used_at_upload)
libs/langchain/tests/unit_tests/smith/evaluation/test_runner_utils.py~L316
proj.id = "123"
return proj
- with mock.patch.object(
- Client, "read_dataset", new=mock_read_dataset
- ), mock.patch.object(Client, "list_examples", new=mock_list_examples), mock.patch(
- "langchain.smith.evaluation.runner_utils._arun_llm_or_chain",
- new=mock_arun_chain,
- ), mock.patch.object(Client, "create_project", new=mock_create_project):
+ with (
+ mock.patch.object(Client, "read_dataset", new=mock_read_dataset),
+ mock.patch.object(Client, "list_examples", new=mock_list_examples),
+ mock.patch(
+ "langchain.smith.evaluation.runner_utils._arun_llm_or_chain",
+ new=mock_arun_chain,
+ ),
+ mock.patch.object(Client, "create_project", new=mock_create_project),
+ ):
client = Client(api_url="http://localhost:1984", api_key="123")
chain = mock.MagicMock()
chain.input_keys = ["foothing"]
libs/partners/huggingface/tests/unit_tests/test_chat_models.py~L231
def test_bind_tools(chat_hugging_face: Any) -> None:
tools = [MagicMock(spec=BaseTool)]
- with patch(
- "langchain_huggingface.chat_models.huggingface.convert_to_openai_tool",
- side_effect=lambda x: x,
- ), patch("langchain_core.runnables.base.Runnable.bind") as mock_super_bind:
+ with (
+ patch(
+ "langchain_huggingface.chat_models.huggingface.convert_to_openai_tool",
+ side_effect=lambda x: x,
+ ),
+ patch("langchain_core.runnables.base.Runnable.bind") as mock_super_bind,
+ ):
chat_hugging_face.bind_tools(tools, tool_choice="auto")
mock_super_bind.assert_called_once()
_, kwargs = mock_super_bind.call_args
prefecthq/prefect (+38 -27 lines across 5 files)
src/integrations/prefect-dbt/prefect_dbt/cloud/jobs.py~L752
run_status = DbtCloudJobRunStatus(run_data.get("status"))
if run_status == DbtCloudJobRunStatus.SUCCESS:
try:
- async with self._dbt_cloud_credentials.get_administrative_client() as client: # noqa
+ async with (
+ self._dbt_cloud_credentials.get_administrative_client() as client
+ ): # noqa
response = await client.list_run_artifacts(
run_id=self.run_id, step=step
)
tests/runner/test_webserver.py~L151
webserver = await build_server(runner)
client = TestClient(webserver)
- with mock.patch(
- "prefect.runner.server.get_client", new=mock_get_client
- ), mock.patch.object(runner, "execute_in_background"):
+ with (
+ mock.patch("prefect.runner.server.get_client", new=mock_get_client),
+ mock.patch.object(runner, "execute_in_background"),
+ ):
with client:
response = client.post(f"/deployment/{deployment_id}/run")
assert response.status_code == 201, response.json()
tests/server/orchestration/api/test_task_run_subscriptions.py~L326
)
await queue.put(task_run)
- with patch("asyncio.sleep", return_value=None), pytest.raises(
- asyncio.TimeoutError
+ with (
+ patch("asyncio.sleep", return_value=None),
+ pytest.raises(asyncio.TimeoutError),
):
extra_task_run = ServerTaskRun(
id=uuid4(),
tests/server/orchestration/api/test_task_run_subscriptions.py~L356
)
await queue.retry(task_run)
- with patch("asyncio.sleep", return_value=None), pytest.raises(
- asyncio.TimeoutError
+ with (
+ patch("asyncio.sleep", return_value=None),
+ pytest.raises(asyncio.TimeoutError),
):
extra_task_run = ServerTaskRun(
id=uuid4(),
tests/test_task_worker.py~L106
async def test_handle_sigterm(mock_create_subscription):
task_worker = TaskWorker(...)
- with patch("sys.exit") as mock_exit, patch.object(
- task_worker, "stop", new_callable=AsyncMock
- ) as mock_stop:
+ with (
+ patch("sys.exit") as mock_exit,
+ patch.object(task_worker, "stop", new_callable=AsyncMock) as mock_stop,
+ ):
await task_worker.start()
mock_create_subscription.assert_called_once()
tests/test_task_worker.py~L120
async def test_task_worker_client_id_is_set():
- with patch("socket.gethostname", return_value="foo"), patch(
- "os.getpid", return_value=42
+ with (
+ patch("socket.gethostname", return_value="foo"),
+ patch("os.getpid", return_value=42),
):
task_worker = TaskWorker(...)
task_worker._client = MagicMock(api_url="http://localhost:4200")
tests/workers/test_base_worker.py~L1912
):
async with WorkerTestImpl(work_pool_name=work_pool.name) as worker:
await worker.start(run_once=True)
- with mock.patch(
- "prefect.workers.base.load_prefect_collections"
- ) as mock_load_prefect_collections, mock.patch(
- ...*[Comment body truncated]*
Needed to prevent updater failures when doing #13927 See - axodotdev/axoupdater#210 - axodotdev/cargo-dist#1538 - astral-sh/uv#8958
Needed to prevent updater failures when doing #13927 See - axodotdev/axoupdater#210 - axodotdev/cargo-dist#1538 - astral-sh/uv#8958
Needed to prevent updater failures when doing #13927 See - axodotdev/axoupdater#210 - axodotdev/cargo-dist#1538 - astral-sh/uv#8958
Needed to prevent updater failures when doing #13927
See
cargo-home
toflat
layout breaks updates axodotdev/axoupdater#210cargo-home
toflat
install layouts axodotdev/cargo-dist#15380.25.2-prerelease.3
uv#8958