### Formatter (stable)
✅ ecosystem check detected no format changes.

### Formatter (preview)
ℹ️ ecosystem check **detected format changes**. (+900 -814 lines in 68 files in 19 projects; 36 projects unchanged)

<details><summary><a href="https://github.com/RasaHQ/rasa">RasaHQ/rasa</a> (+6 -6 lines across 2 files)</summary>
<p>
<pre>ruff format --preview</pre>
</p>
<p>

<a href='https://github.com/RasaHQ/rasa/blob/b8de3b231126747ff74b2782cb25cb22d2d898d7/rasa/nlu/extractors/crf_entity_extractor.py#L101'>rasa/nlu/extractors/crf_entity_extractor.py~L101</a>
```diff
         CRFEntityExtractorOptions.SUFFIX1: lambda crf_token: crf_token.text[-1:],
         CRFEntityExtractorOptions.BIAS: lambda _: "bias",
         CRFEntityExtractorOptions.POS: lambda crf_token: crf_token.pos_tag,
-        CRFEntityExtractorOptions.POS2: lambda crf_token: crf_token.pos_tag[:2]
-        if crf_token.pos_tag is not None
-        else None,
+        CRFEntityExtractorOptions.POS2: lambda crf_token: (
+            crf_token.pos_tag[:2] if crf_token.pos_tag is not None else None
+        ),
         CRFEntityExtractorOptions.UPPER: lambda crf_token: crf_token.text.isupper(),
         CRFEntityExtractorOptions.DIGIT: lambda crf_token: crf_token.text.isdigit(),
         CRFEntityExtractorOptions.PATTERN: lambda crf_token: crf_token.pattern,
```
<a href='https://github.com/RasaHQ/rasa/blob/b8de3b231126747ff74b2782cb25cb22d2d898d7/rasa/nlu/featurizers/sparse_featurizer/lexical_syntactic_featurizer.py#L86'>rasa/nlu/featurizers/sparse_featurizer/lexical_syntactic_featurizer.py~L86</a>
```diff
         "suffix2": lambda token: token.text[-2:],
         "suffix1": lambda token: token.text[-1:],
         "pos": lambda token: token.data.get(POS_TAG_KEY, None),
-        "pos2": lambda token: token.data.get(POS_TAG_KEY, [])[:2]
-        if POS_TAG_KEY in token.data
-        else None,
+        "pos2": lambda token: (
+            token.data.get(POS_TAG_KEY, [])[:2] if POS_TAG_KEY in token.data else None
+        ),
         "upper": lambda token: token.text.isupper(),
         "digit": lambda token: token.text.isdigit(),
     }
```

</p>
</details>
<details><summary><a href="https://github.com/PlasmaPy/PlasmaPy">PlasmaPy/PlasmaPy</a> (+2 -2 lines across 1 file)</summary>
<p>
<pre>ruff format --preview</pre>
</p>
<p>

<a href='https://github.com/PlasmaPy/PlasmaPy/blob/f95c6a4b6629f094b39837614f50741dc13e2282/src/plasmapy/particles/atomic.py#L1245'>src/plasmapy/particles/atomic.py~L1245</a>
```diff
         # If it has been indicated that the user wants the interpolator, construct
         # an anonymous function to handle units and sanitize IO
         if return_interpolator:
-            return (
-                lambda x: np.exp(cs(np.log(x.to(u.MeV).value))) * u.MeV * u.cm**2 / u.g
+            return lambda x: (
+                np.exp(cs(np.log(x.to(u.MeV).value))) * u.MeV * u.cm**2 / u.g
             )
 
         return (
```

</p>
</details>
<details><summary><a href="https://github.com/apache/airflow">apache/airflow</a> (+10 -13 lines across 4 files)</summary>
<p>
<pre>ruff format --preview</pre>
</p>
<p>

<a href='https://github.com/apache/airflow/blob/f4cd07129d82778991010396e800b79fca142889/airflow-core/tests/unit/cli/commands/test_config_command.py#L355'>airflow-core/tests/unit/cli/commands/test_config_command.py~L355</a>
```diff
     def test_lint_detects_multiple_issues(self, stdout_capture):
         with mock.patch(
             "airflow.configuration.conf.has_option",
-            side_effect=lambda section, option, lookup_from_deprecated: option
-            in ["check_slas", "strict_dataset_uri_validation"],
+            side_effect=lambda section, option, lookup_from_deprecated: (
+                option in ["check_slas", "strict_dataset_uri_validation"]
+            ),
         ):
             with stdout_capture as temp_stdout:
                 config_command.lint_config(cli_parser.get_parser().parse_args(["config", "lint"]))
```
<a href='https://github.com/apache/airflow/blob/f4cd07129d82778991010396e800b79fca142889/providers/cncf/kubernetes/tests/unit/cncf/kubernetes/executors/test_kubernetes_executor.py#L992'>providers/cncf/kubernetes/tests/unit/cncf/kubernetes/executors/test_kubernetes_executor.py~L992</a>
```diff
         mock_ti.queued_by_job_id = "10"  # scheduler_job would have updated this after the first adoption
         executor.scheduler_job_id = "20"
         # assume success adopting, `adopt_launched_task` pops `ti_key` from `tis_to_flush_by_key`
-        mock_adopt_launched_task.side_effect = (
-            lambda client, pod, tis_to_flush_by_key: tis_to_flush_by_key.pop(ti_key)
+        mock_adopt_launched_task.side_effect = lambda client, pod, tis_to_flush_by_key: (
+            tis_to_flush_by_key.pop(ti_key)
         )
 
         reset_tis = executor.try_adopt_task_instances([mock_ti])
```
<a href='https://github.com/apache/airflow/blob/f4cd07129d82778991010396e800b79fca142889/providers/docker/tests/unit/docker/operators/test_docker.py#L153'>providers/docker/tests/unit/docker/operators/test_docker.py~L153</a>
```diff
         self.client_mock.attach.return_value = self.log_messages
 
         # If logs() is called with tail then only return the last value, otherwise return the whole log.
-        self.client_mock.logs.side_effect = (
-            lambda **kwargs: iter(self.log_messages[-kwargs["tail"] :])
-            if "tail" in kwargs
-            else iter(self.log_messages)
+        self.client_mock.logs.side_effect = lambda **kwargs: (
+            iter(self.log_messages[-kwargs["tail"] :]) if "tail" in kwargs else iter(self.log_messages)
         )
 
         docker_api_client_patcher.return_value = self.client_mock
```
<a href='https://github.com/apache/airflow/blob/f4cd07129d82778991010396e800b79fca142889/providers/docker/tests/unit/docker/operators/test_docker.py#L622'>providers/docker/tests/unit/docker/operators/test_docker.py~L622</a>
```diff
         self.client_mock.pull.return_value = [b'{"status":"pull log"}']
         self.client_mock.attach.return_value = iter([b"container log 1 \n", b"container log 2\n"])
         # Make sure the logs side effect is updated after the change
-        self.client_mock.attach.side_effect = (
-            lambda **kwargs: iter(self.log_messages[-kwargs["tail"] :])
-            if "tail" in kwargs
-            else iter(self.log_messages)
+        self.client_mock.attach.side_effect = lambda **kwargs: (
+            iter(self.log_messages[-kwargs["tail"] :]) if "tail" in kwargs else iter(self.log_messages)
         )
 
         kwargs = {
```
<a href='https://github.com/apache/airflow/blob/f4cd07129d82778991010396e800b79fca142889/providers/http/tests/unit/http/sensors/test_http.py#L302'>providers/http/tests/unit/http/sensors/test_http.py~L302</a>
```diff
             method="GET",
             endpoint="/search",
             data={"client": "ubuntu", "q": "airflow"},
-            response_check=lambda response: ("apache/airflow" in response.text),
+            response_check=lambda response: "apache/airflow" in response.text,
             headers={},
         )
         op.execute({})
```

</p>
</details>
<details><summary><a href="https://github.com/apache/superset">apache/superset</a> (+34 -25 lines across 7 files)</summary>
<p>
<pre>ruff format --preview</pre>
</p>
<p>

<a href='https://github.com/apache/superset/blob/9cf86c1533b99b95c3a290b9ba694e90cf202a04/superset/tags/api.py#L598'>superset/tags/api.py~L598</a>
```diff
     @statsd_metrics
     @rison({"type": "array", "items": {"type": "integer"}})
     @event_logger.log_this_with_context(
-        action=lambda self, *args, **kwargs: f"{self.__class__.__name__}"
-        f".favorite_status",
+        action=lambda self, *args, **kwargs: (
+            f"{self.__class__.__name__}.favorite_status"
+        ),
         log_to_statsd=False,
     )
     def favorite_status(self, **kwargs: Any) -> Response:
```
<a href='https://github.com/apache/superset/blob/9cf86c1533b99b95c3a290b9ba694e90cf202a04/superset/tags/api.py#L696'>superset/tags/api.py~L696</a>
```diff
     @safe
     @statsd_metrics
     @event_logger.log_this_with_context(
-        action=lambda self, *args, **kwargs: f"{self.__class__.__name__}"
-        f".remove_favorite",
+        action=lambda self, *args, **kwargs: (
+            f"{self.__class__.__name__}.remove_favorite"
+        ),
         log_to_statsd=False,
     )
     def remove_favorite(self, pk: int) -> Response:
```
<a href='https://github.com/apache/superset/blob/9cf86c1533b99b95c3a290b9ba694e90cf202a04/tests/integration_tests/datasource_tests.py#L213'>tests/integration_tests/datasource_tests.py~L213</a>
```diff
     def test_external_metadata_by_name_for_virtual_table_uses_mutator(self):
         self.login(ADMIN_USERNAME)
         with create_and_cleanup_table() as tbl:
-            current_app.config["SQL_QUERY_MUTATOR"] = (
-                lambda sql, **kwargs: "SELECT 456 as intcol, 'def' as mutated_strcol"
+            current_app.config["SQL_QUERY_MUTATOR"] = lambda sql, **kwargs: (
+                "SELECT 456 as intcol, 'def' as mutated_strcol"
             )
 
             params = prison.dumps({
```
<a href='https://github.com/apache/superset/blob/9cf86c1533b99b95c3a290b9ba694e90cf202a04/tests/integration_tests/datasource_tests.py#L339'>tests/integration_tests/datasource_tests.py~L339</a>
```diff
 
         pytest.raises(
             SupersetGenericDBErrorException,
-            lambda: db.session.query(SqlaTable)
-            .filter_by(id=tbl.id)
-            .one_or_none()
-            .external_metadata(),
+            lambda: (
+                db.session.query(SqlaTable)
+                .filter_by(id=tbl.id)
+                .one_or_none()
+                .external_metadata()
+            ),
         )
 
         resp = self.client.get(url)
```
<a href='https://github.com/apache/superset/blob/9cf86c1533b99b95c3a290b9ba694e90cf202a04/tests/integration_tests/db_engine_specs/presto_tests.py#L81'>tests/integration_tests/db_engine_specs/presto_tests.py~L81</a>
```diff
     def verify_presto_column(self, column, expected_results):
         inspector = mock.Mock()
         preparer = inspector.engine.dialect.identifier_preparer
-        preparer.quote_identifier = preparer.quote = preparer.quote_schema = (
-            lambda x: f'"{x}"'
+        preparer.quote_identifier = preparer.quote = preparer.quote_schema = lambda x: (
+            f'"{x}"'
         )
         row = mock.Mock()
         row.Column, row.Type, row.Null = column
```
<a href='https://github.com/apache/superset/blob/9cf86c1533b99b95c3a290b9ba694e90cf202a04/tests/integration_tests/db_engine_specs/presto_tests.py#L827'>tests/integration_tests/db_engine_specs/presto_tests.py~L827</a>
```diff
     def test_show_columns(self):
         inspector = mock.MagicMock()
         preparer = inspector.engine.dialect.identifier_preparer
-        preparer.quote_identifier = preparer.quote = preparer.quote_schema = (
-            lambda x: f'"{x}"'
+        preparer.quote_identifier = preparer.quote = preparer.quote_schema = lambda x: (
+            f'"{x}"'
         )
         inspector.bind.execute.return_value.fetchall = mock.MagicMock(
             return_value=["a", "b"]
```
<a href='https://github.com/apache/superset/blob/9cf86c1533b99b95c3a290b9ba694e90cf202a04/tests/integration_tests/db_engine_specs/presto_tests.py#L843'>tests/integration_tests/db_engine_specs/presto_tests.py~L843</a>
```diff
     def test_show_columns_with_schema(self):
         inspector = mock.MagicMock()
         preparer = inspector.engine.dialect.identifier_preparer
-        preparer.quote_identifier = preparer.quote = preparer.quote_schema = (
-            lambda x: f'"{x}"'
+        preparer.quote_identifier = preparer.quote = preparer.quote_schema = lambda x: (
+            f'"{x}"'
         )
         inspector.bind.execute.return_value.fetchall = mock.MagicMock(
             return_value=["a", "b"]
```
<a href='https://github.com/apache/superset/blob/9cf86c1533b99b95c3a290b9ba694e90cf202a04/tests/integration_tests/security/api_tests.py#L187'>tests/integration_tests/security/api_tests.py~L187</a>
```diff
         self.assert500(self._get_guest_token_with_rls(rls_rule))
 
     @with_config({
-        "GUEST_TOKEN_VALIDATOR_HOOK": lambda x: len(x["rls"]) == 1
-        and "tenant_id=" in x["rls"][0]["clause"]
+        "GUEST_TOKEN_VALIDATOR_HOOK": lambda x: (
+            len(x["rls"]) == 1 and "tenant_id=" in x["rls"][0]["clause"]
+        )
     })
     def test_guest_validator_hook_real_world_example_positive(self):
         """
```
<a href='https://github.com/apache/superset/blob/9cf86c1533b99b95c3a290b9ba694e90cf202a04/tests/integration_tests/security/api_tests.py#L201'>tests/integration_tests/security/api_tests.py~L201</a>
```diff
         self.assert200(self._get_guest_token_with_rls(rls_rule))
 
     @with_config({
-        "GUEST_TOKEN_VALIDATOR_HOOK": lambda x: len(x["rls"]) == 1
-        and "tenant_id=" in x["rls"][0]["clause"]
+        "GUEST_TOKEN_VALIDATOR_HOOK": lambda x: (
+            len(x["rls"]) == 1 and "tenant_id=" in x["rls"][0]["clause"]
+        )
     })
     def test_guest_validator_hook_real_world_example_negative(self):
         """
```
<a href='https://github.com/apache/superset/blob/9cf86c1533b99b95c3a290b9ba694e90cf202a04/tests/unit_tests/datasets/test_datetime_format_detector.py#L44'>tests/unit_tests/datasets/test_datetime_format_detector.py~L44</a>
```diff
     dataset.database.get_sqla_engine.return_value.__exit__.return_value = None
 
     # Mock apply_limit_to_sql to return SQL with LIMIT
-    dataset.database.apply_limit_to_sql = (
-        lambda sql, limit, force: f"{sql} LIMIT {limit}"
+    dataset.database.apply_limit_to_sql = lambda sql, limit, force: (
+        f"{sql} LIMIT {limit}"
     )
 
     return dataset
```
<a href='https://github.com/apache/superset/blob/9cf86c1533b99b95c3a290b9ba694e90cf202a04/tests/unit_tests/importexport/api_test.py#L48'>tests/unit_tests/importexport/api_test.py~L48</a>
```diff
     mocked_export_result = [
         (
             "metadata.yaml",
-            lambda: "version: 1.0.0\ntype: assets\ntimestamp: '2022-01-01T00:00:00+00:00'\n",  # noqa: E501
+            lambda: (
+                "version: 1.0.0\ntype: assets\ntimestamp: '2022-01-01T00:00:00+00:00'\n"
+            ),  # noqa: E501
         ),
         ("databases/example.yaml", lambda: "<DATABASE CONTENTS>"),
     ]
```
<a href='https://github.com/apache/superset/blob/9cf86c1533b99b95c3a290b9ba694e90cf202a04/tests/unit_tests/utils/test_core.py#L635'>tests/unit_tests/utils/test_core.py~L635</a>
```diff
 
 
 @with_config({
-    "USER_AGENT_FUNC": lambda database,
-    source: f"{database.database_name} {source.name}"
+    "USER_AGENT_FUNC": lambda database, source: (
+        f"{database.database_name} {source.name}"
+    )
 })
 def test_get_user_agent_custom(mocker: MockerFixture, app_context: None) -> None:
     database_mock = mocker.MagicMock()
```

</p>
</details>
<details><summary><a href="https://github.com/aws/aws-sam-cli">aws/aws-sam-cli</a> (+15 -12 lines across 1 file)</summary>
<p>
<pre>ruff format --preview</pre>
</p>
<p>

<a href='https://github.com/aws/aws-sam-cli/blob/a367657230ac67dc46de62f7d71e4e5a75e124ff/samcli/lib/cli_validation/image_repository_validation.py#L70'>samcli/lib/cli_validation/image_repository_validation.py~L70</a>
```diff
 
             validators = [
                 Validator(
-                    validation_function=lambda: bool(image_repository)
-                    + bool(image_repositories)
-                    + bool(resolve_image_repos)
-                    > 1,
+                    validation_function=lambda: (
+                        bool(image_repository) + bool(image_repositories) + bool(resolve_image_repos) > 1
+                    ),
                     exception=click.BadOptionUsage(
                         option_name="--image-repositories",
                         ctx=ctx,
```
<a href='https://github.com/aws/aws-sam-cli/blob/a367657230ac67dc46de62f7d71e4e5a75e124ff/samcli/lib/cli_validation/image_repository_validation.py#L82'>samcli/lib/cli_validation/image_repository_validation.py~L82</a>
```diff
                     ),
                 ),
                 Validator(
-                    validation_function=lambda: not guided
-                    and not (image_repository or image_repositories or resolve_image_repos)
-                    and required,
+                    validation_function=lambda: (
+                        not guided and not (image_repository or image_repositories or resolve_image_repos) and required
+                    ),
                     exception=click.BadOptionUsage(
                         option_name="--image-repositories",
                         ctx=ctx,
```
<a href='https://github.com/aws/aws-sam-cli/blob/a367657230ac67dc46de62f7d71e4e5a75e124ff/samcli/lib/cli_validation/image_repository_validation.py#L92'>samcli/lib/cli_validation/image_repository_validation.py~L92</a>
```diff
                     ),
                 ),
                 Validator(
-                    validation_function=lambda: not guided
-                    and (
-                        image_repositories
-                        and not resolve_image_repos
-                        and not _is_all_image_funcs_provided(template_file, image_repositories, parameters_overrides)
+                    validation_function=lambda: (
+                        not guided
+                        and (
+                            image_repositories
+                            and not resolve_image_repos
+                            and not _is_all_image_funcs_provided(
+                                template_file, image_repositories, parameters_overrides
+                            )
+                        )
                     ),
                     exception=click.BadOptionUsage(
                         option_name="--image-repositories", ctx=ctx, message=image_repos_error_msg
```

</p>
</details>
<details><summary><a href="https://github.com/binary-husky/gpt_academic">binary-husky/gpt_academic</a> (+30 -26 lines across 3 files)</summary>
<p>
<pre>ruff format --preview</pre>
</p>
<p>

<a href='https://github.com/binary-husky/gpt_academic/blob/0aa0472da44edc0a888c7f83b564c6d0d1089366/crazy_functions/agent_fns/general.py#L83'>crazy_functions/agent_fns/general.py~L83</a>
```diff
             }
             kwargs.update(agent_kwargs)
             agent_handle = agent_cls(**kwargs)
-            agent_handle._print_received_message = (
-                lambda a, b: self.gpt_academic_print_override(agent_kwargs, a, b)
+            agent_handle._print_received_message = lambda a, b: (
+                self.gpt_academic_print_override(agent_kwargs, a, b)
             )
             for d in agent_handle._reply_func_list:
                 if (
```
<a href='https://github.com/binary-husky/gpt_academic/blob/0aa0472da44edc0a888c7f83b564c6d0d1089366/crazy_functions/agent_fns/general.py#L93'>crazy_functions/agent_fns/general.py~L93</a>
```diff
                 ):
                     d["reply_func"] = gpt_academic_generate_oai_reply
             if agent_kwargs["name"] == "user_proxy":
-                agent_handle.get_human_input = (
-                    lambda a: self.gpt_academic_get_human_input(user_proxy, a)
+                agent_handle.get_human_input = lambda a: (
+                    self.gpt_academic_get_human_input(user_proxy, a)
                 )
                 user_proxy = agent_handle
             if agent_kwargs["name"] == "assistant":
```
<a href='https://github.com/binary-husky/gpt_academic/blob/0aa0472da44edc0a888c7f83b564c6d0d1089366/crazy_functions/agent_fns/general.py#L134'>crazy_functions/agent_fns/general.py~L134</a>
```diff
                 kwargs = {"code_execution_config": code_execution_config}
                 kwargs.update(agent_kwargs)
                 agent_handle = agent_cls(**kwargs)
-                agent_handle._print_received_message = (
-                    lambda a, b: self.gpt_academic_print_override(agent_kwargs, a, b)
+                agent_handle._print_received_message = lambda a, b: (
+                    self.gpt_academic_print_override(agent_kwargs, a, b)
                 )
                 agents_instances.append(agent_handle)
                 if agent_kwargs["name"] == "user_proxy":
                     user_proxy = agent_handle
-                    user_proxy.get_human_input = (
-                        lambda a: self.gpt_academic_get_human_input(user_proxy, a)
+                    user_proxy.get_human_input = lambda a: (
+                        self.gpt_academic_get_human_input(user_proxy, a)
                     )
             try:
                 groupchat = autogen.GroupChat(
```
<a href='https://github.com/binary-husky/gpt_academic/blob/0aa0472da44edc0a888c7f83b564c6d0d1089366/crazy_functions/agent_fns/general.py#L150'>crazy_functions/agent_fns/general.py~L150</a>
```diff
                 manager = autogen.GroupChatManager(
                     groupchat=groupchat, **self.define_group_chat_manager_config()
                 )
-                manager._print_received_message = (
-                    lambda a, b: self.gpt_academic_print_override(agent_kwargs, a, b)
+                manager._print_received_message = lambda a, b: (
+                    self.gpt_academic_print_override(agent_kwargs, a, b)
                 )
                 manager.get_human_input = lambda a: self.gpt_academic_get_human_input(
                     manager, a
```
<a href='https://github.com/binary-husky/gpt_academic/blob/0aa0472da44edc0a888c7f83b564c6d0d1089366/crazy_functions/crazy_utils.py#L299'>crazy_functions/crazy_utils.py~L299</a>
```diff
         retry_op = retry_times_at_unknown_error
         exceeded_cnt = 0
         mutable[index][2] = "执行中"
-        detect_timeout = (
-            lambda: len(mutable[index]) >= 2
+        detect_timeout = lambda: (
+            len(mutable[index]) >= 2
             and (time.time() - mutable[index][1]) > watch_dog_patience
         )
         while True:
```
<a href='https://github.com/binary-husky/gpt_academic/blob/0aa0472da44edc0a888c7f83b564c6d0d1089366/crazy_functions/review_fns/paper_processor/paper_llm_ranker.py#L143'>crazy_functions/review_fns/paper_processor/paper_llm_ranker.py~L143</a>
```diff
                     )
                 elif search_criteria.query_type == "review":
                     papers.sort(
-                        key=lambda x: 1
-                        if any(
-                            keyword in (getattr(x, "title", "") or "").lower()
-                            or keyword in (getattr(x, "abstract", "") or "").lower()
-                            for keyword in ["review", "survey", "overview"]
-                        )
-                        else 0,
+                        key=lambda x: (
+                            1
+                            if any(
+                                keyword in (getattr(x, "title", "") or "").lower()
+                                or keyword in (getattr(x, "abstract", "") or "").lower()
+                                for keyword in ["review", "survey", "overview"]
+                            )
+                            else 0
+                        ),
                         reverse=True,
                     )
             return papers[:top_k]
```
<a href='https://github.com/binary-husky/gpt_academic/blob/0aa0472da44edc0a888c7f83b564c6d0d1089366/crazy_functions/review_fns/paper_processor/paper_llm_ranker.py#L164'>crazy_functions/review_fns/paper_processor/paper_llm_ranker.py~L164</a>
```diff
         if search_criteria and search_criteria.query_type == "review":
             papers = sorted(
                 papers,
-                key=lambda x: 1
-                if any(
-                    keyword in (getattr(x, "title", "") or "").lower()
-                    or keyword in (getattr(x, "abstract", "") or "").lower()
-                    for keyword in ["review", "survey", "overview"]
-                )
-                else 0,
+                key=lambda x: (
+                    1
+                    if any(
+                        keyword in (getattr(x, "title", "") or "").lower()
+                        or keyword in (getattr(x, "abstract", "") or "").lower()
+                        for keyword in ["review", "survey", "overview"]
+                    )
+                    else 0
+                ),
                 reverse=True,
             )
 
```

</p>
</details>
<details><summary><a href="https://github.com/ibis-project/ibis">ibis-project/ibis</a> (+135 -119 lines across 7 files)</summary>
<p>
<pre>ruff format --preview</pre>
</p>
<p>

<a href='https://github.com/ibis-project/ibis/blob/9126733b38e1c92f6e787f92dc9954e88ab6400d/ibis/backends/datafusion/__init__.py#L246'>ibis/backends/datafusion/__init__.py~L246</a>
```diff
 
         for name, func in inspect.getmembers(
             udfs,
-            predicate=lambda m: callable(m)
-            and not m.__name__.startswith("_")
-            and m.__module__ == udfs.__name__,
+            predicate=lambda m: (
+                callable(m)
+                and not m.__name__.startswith("_")
+                and m.__module__ == udfs.__name__
+            ),
         ):
             annotations = typing.get_type_hints(func)
             argnames = list(inspect.signature(func).parameters.keys())
```
<a href='https://github.com/ibis-project/ibis/blob/9126733b38e1c92f6e787f92dc9954e88ab6400d/ibis/backends/sql/dialects.py#L241'>ibis/backends/sql/dialects.py~L241</a>
```diff
             sge.ArrayAgg: rename_func("array_agg"),
             sge.ArraySort: rename_func("array_sort"),
             sge.Length: rename_func("char_length"),
-            sge.TryCast: lambda self,
-            e: f"TRY_CAST({e.this.sql(self.dialect)} AS {e.to.sql(self.dialect)})",
+            sge.TryCast: lambda self, e: (
+                f"TRY_CAST({e.this.sql(self.dialect)} AS {e.to.sql(self.dialect)})"
+            ),
             sge.DayOfYear: rename_func("dayofyear"),
             sge.DayOfWeek: rename_func("dayofweek"),
             sge.DayOfMonth: rename_func("dayofmonth"),
```
<a href='https://github.com/ibis-project/ibis/blob/9126733b38e1c92f6e787f92dc9954e88ab6400d/ibis/backends/tests/test_aggregation.py#L1278'>ibis/backends/tests/test_aggregation.py~L1278</a>
```diff
         )
         .groupby("bigint_col")
         .string_col.agg(
-            lambda s: (np.nan if pd.isna(s).all() else pandas_sep.join(s.values))
+            lambda s: np.nan if pd.isna(s).all() else pandas_sep.join(s.values)
         )
         .rename("tmp")
         .sort_index()
```
<a href='https://github.com/ibis-project/ibis/blob/9126733b38e1c92f6e787f92dc9954e88ab6400d/ibis/backends/tests/test_window.py#L214'>ibis/backends/tests/test_window.py~L214</a>
```diff
         ),
         param(
             lambda t, win: t.double_col.cummean().over(win),
-            lambda t: (t.double_col.expanding().mean().reset_index(drop=True, level=0)),
+            lambda t: t.double_col.expanding().mean().reset_index(drop=True, level=0),
             id="cummean",
             marks=pytest.mark.notimpl(["druid"], raises=PyDruidProgrammingError),
         ),
```
<a href='https://github.com/ibis-project/ibis/blob/9126733b38e1c92f6e787f92dc9954e88ab6400d/ibis/backends/tests/test_window.py#L279'>ibis/backends/tests/test_window.py~L279</a>
```diff
         ),
         param(
             lambda t, win: t.double_col.mean().over(win),
-            lambda gb: (
-                gb.double_col.expanding().mean().reset_index(drop=True, level=0)
-            ),
+            lambda gb: gb.double_col.expanding().mean().reset_index(drop=True, level=0),
             id="mean",
             marks=pytest.mark.notimpl(["druid"], raises=PyDruidProgrammingError),
         ),
```
<a href='https://github.com/ibis-project/ibis/blob/9126733b38e1c92f6e787f92dc9954e88ab6400d/ibis/backends/tests/test_window.py#L335'>ibis/backends/tests/test_window.py~L335</a>
```diff
     [
         param(
             lambda t, win: t.double_col.mean().over(win),
-            lambda df: (df.double_col.expanding().mean()),
+            lambda df: df.double_col.expanding().mean(),
             id="mean",
             marks=[
                 pytest.mark.notimpl(
```
<a href='https://github.com/ibis-project/ibis/blob/9126733b38e1c92f6e787f92dc9954e88ab6400d/ibis/backends/tests/test_window.py#L350'>ibis/backends/tests/test_window.py~L350</a>
```diff
             # Disabled on PySpark and Spark backends because in pyspark<3.0.0,
             # Pandas UDFs are only supported on unbounded windows
             lambda t, win: mean_udf(t.double_col).over(win),
-            lambda df: (df.double_col.expanding().mean()),
+            lambda df: df.double_col.expanding().mean(),
             id="mean_udf",
             marks=[
                 pytest.mark.notimpl(
```
<a href='https://github.com/ibis-project/ibis/blob/9126733b38e1c92f6e787f92dc9954e88ab6400d/ibis/backends/tests/test_window.py#L538'>ibis/backends/tests/test_window.py~L538</a>
```diff
     [
         param(
             lambda t, win: t.double_col.mean().over(win),
-            lambda gb: (gb.double_col.transform("mean")),
+            lambda gb: gb.double_col.transform("mean"),
             id="mean",
             marks=pytest.mark.notimpl(["druid"], raises=PyDruidProgrammingError),
         ),
         param(
             lambda t, win: mean_udf(t.double_col).over(win),
-            lambda gb: (gb.double_col.transform("mean")),
+            lambda gb: gb.double_col.transform("mean"),
             id="mean_udf",
             marks=[
                 pytest.mark.notimpl(
```
<a href='https://github.com/ibis-project/ibis/blob/9126733b38e1c92f6e787f92dc9954e88ab6400d/ibis/backends/tests/test_window.py#L1192'>ibis/backends/tests/test_window.py~L1192</a>
```diff
     expected = (
         df.sort_values("int_col")
         .groupby(df["int_col"].notnull())
-        .apply(lambda df: (df.int_col.rank(method="min").sub(1).div(len(df) - 1)))
+        .apply(lambda df: df.int_col.rank(method="min").sub(1).div(len(df) - 1))
         .T.reset_index(drop=True)
         .iloc[:, 0]
         .rename(expr.get_name())
```
<a href='https://github.com/ibis-project/ibis/blob/9126733b38e1c92f6e787f92dc9954e88ab6400d/ibis/backends/tests/tpc/ds/test_queries.py#L35'>ibis/backends/tests/tpc/ds/test_queries.py~L35</a>
```diff
         )
         .join(customer, _.ctr_customer_sk == customer.c_customer_sk)
         .filter(
-            lambda t: t.ctr_total_return
-            > ctr2.filter(t.ctr_store_sk == ctr2.ctr_store_sk)
-            .ctr_total_return.mean()
-            .as_scalar()
-            * 1.2
+            lambda t: (
+                t.ctr_total_return
+                > ctr2.filter(t.ctr_store_sk == ctr2.ctr_store_sk)
+                .ctr_total_return.mean()
+                .as_scalar()
+                * 1.2
+            )
         )
         .select(_.c_customer_id)
         .order_by(_.c_customer_id)
```
<a href='https://github.com/ibis-project/ibis/blob/9126733b38e1c92f6e787f92dc9954e88ab6400d/ibis/backends/tests/tpc/ds/test_queries.py#L783'>ibis/backends/tests/tpc/ds/test_queries.py~L783</a>
```diff
                 > 0
             ),
             lambda t: (
-                web_sales.join(date_dim, [("ws_sold_date_sk", "d_date_sk")])
-                .filter(
-                    t.c_customer_sk == web_sales.ws_bill_customer_sk,
-                    _.d_year == 2002,
-                    _.d_moy.between(1, 1 + 3),
+                (
+                    web_sales.join(date_dim, [("ws_sold_date_sk", "d_date_sk")])
+                    .filter(
+                        t.c_customer_sk == web_sales.ws_bill_customer_sk,
+                        _.d_year == 2002,
+                        _.d_moy.between(1, 1 + 3),
+                    )
+                    .count()
+                    > 0
                 )
-                .count()
-                > 0
-            )
-            | (
-                catalog_sales.join(date_dim, [("cs_sold_date_sk", "d_date_sk")])
-                .filter(
-                    t.c_customer_sk == catalog_sales.cs_ship_customer_sk,
-                    _.d_year == 2002,
-                    _.d_moy.between(1, 1 + 3),
+                | (
+                    catalog_sales.join(date_dim, [("cs_sold_date_sk", "d_date_sk")])
+                    .filter(
+                        t.c_customer_sk == catalog_sales.cs_ship_customer_sk,
+                        _.d_year == 2002,
+                        _.d_moy.between(1, 1 + 3),
+                    )
+                    .count()
+                    > 0
                 )
-                .count()
-                > 0
             ),
         )
         .group_by(
```
<a href='https://github.com/ibis-project/ibis/blob/9126733b38e1c92f6e787f92dc9954e88ab6400d/ibis/backends/tests/tpc/ds/test_queries.py#L1037'>ibis/backends/tests/tpc/ds/test_queries.py~L1037</a>
```diff
             _.d_date.between(date("2002-02-01"), date("2002-04-02")),
             _.ca_state == "GA",
             _.cc_county == "Williamson County",
-            lambda t: catalog_sales.filter(
-                t.cs_order_number == _.cs_order_number,
-                t.cs_warehouse_sk != _.cs_warehouse_sk,
-            ).count()
-            > 0,
-            lambda t: catalog_returns.filter(
-                t.cs_order_number == _.cr_order_number
-            ).count()
-            == 0,
+            lambda t: (
+                catalog_sales.filter(
+                    t.cs_order_number == _.cs_order_number,
+                    t.cs_warehouse_sk != _.cs_warehouse_sk,
+                ).count()
+                > 0
+            ),
+            lambda t: (
+                catalog_returns.filter(t.cs_order_number == _.cr_order_number).count()
+                == 0
+            ),
         )
         .agg(**{
             "order count": _.cs_order_number.nunique(),
```
<a href='https://github.com/ibis-project/ibis/blob/9126733b38e1c92f6e787f92dc9954e88ab6400d/ibis/backends/tests/tpc/ds/test_queries.py#L2057'>ibis/backends/tests/tpc/ds/test_queries.py~L2057</a>
```diff
         item.view()
         .filter(
             _.i_manufact_id.between(738, 738 + 40),
-            lambda i1: item.filter(
-                lambda s: (
-                    (i1.i_manufact == s.i_manufact)
-                    & (
-                        (
-                            (s.i_category == "Women")
-                            & s.i_color.isin(("powder", "khaki"))
-                            & s.i_units.isin(("Ounce", "Oz"))
-                            & s.i_size.isin(("medium", "extra large"))
-                        )
-                        | (
-                            (s.i_category == "Women")
-                            & s.i_color.isin(("brown", "honeydew"))
-                            & s.i_units.isin(("Bunch", "Ton"))
-                            & s.i_size.isin(("N/A", "small"))
-                        )
-                        | (
-                            (s.i_category == "Men")
-                            & s.i_color.isin(("floral", "deep"))
-                            & s.i_units.isin(("N/A", "Dozen"))
-                            & s.i_size.isin(("petite", "petite"))
-                        )
-                        | (
-                            (s.i_category == "Men")
-                            & s.i_color.isin(("light", "cornflower"))
-                            & s.i_units.isin(("Box", "Pound"))
-                            & s.i_size.isin(("medium", "extra large"))
-                        )
-                    )
-                )
-                | (
-                    (i1.i_manufact == s.i_manufact)
-                    & (
+            lambda i1: (
+                item.filter(
+                    lambda s: (
                         (
-                            (s.i_category == "Women")
-                            & s.i_color.isin(("midnight", "snow"))
-                            & s.i_units.isin(("Pallet", "Gross"))
-                            & s.i_size.isin(("medium", "extra large"))
-                        )
-                        | (
-                            (s.i_category == "Women")
-                            & s.i_color.isin(("cyan", "papaya"))
-                            & s.i_units.isin(("Cup", "Dram"))
-                            & s.i_size.isin(("N/A", "small"))
-                        )
-                        | (
-                            (s.i_category == "Men")
-                            & s.i_color.isin(("orange", "frosted"))
-                            & s.i_units.isin(("Each", "Tbl"))
-                            & s.i_size.isin(("petite", "petite"))
+                            (i1.i_manufact == s.i_manufact)
+                            & (
+                                (
+                                    (s.i_category == "Women")
+                                    & s.i_color.isin(("powder", "khaki"))
+                                    & s.i_units.isin(("Ounce", "Oz"))
+                                    & s.i_size.isin(("medium", "extra large"))
+                                )
+                                | (
+                                    (s.i_category == "Women")
+                                    & s.i_color.isin(("brown", "honeydew"))
+                                    & s.i_units.isin(("Bunch", "Ton"))
+                                    & s.i_size.isin(("N/A", "small"))
+                                )
+                                | (
+                                    (s.i_category == "Men")
+                                    & s.i_color.isin(("floral", "deep"))
+                                    & s.i_units.isin(("N/A", "Dozen"))
+                                    & s.i_size.isin(("petite", "petite"))
+                                )
+                                | (
+                                    (s.i_category == "Men")
+                                    & s.i_color.isin(("light", "cornflower"))
+                                    & s.i_units.isin(("Box", "Pound"))
+                                    & s.i_size.isin(("medium", "extra large"))
+                                )
+                            )
                         )
                         | (
-                            (s.i_category == "Men")
-                            & s.i_color.isin(("forest", "ghost"))
-                            & s.i_units.isin(("Lb", "Bundle"))
-                            & s.i_size.isin(("medium", "extra large"))
+                            (i1.i_manufact == s.i_manufact)
+                            & (
+                                (
+                                    (s.i_category == "Women")
+                                    & s.i_color.isin(("midnight", "snow"))
+                                    & s.i_units.isin(("Pallet", "Gross"))
+                                    & s.i_size.isin(("medium", "extra large"))
+                                )
+                                | (
+                                    (s.i_category == "Women")
+                                    & s.i_color.isin(("cyan", "papaya"))
+                                    & s.i_units.isin(("Cup", "Dram"))
+                                    & s.i_size.isin(("N/A", "small"))
+                                )
+                                | (
+                                    (s.i_category == "Men")
+                                    & s.i_color.isin(("orange", "frosted"))
+                                    & s.i_units.isin(("Each", "Tbl"))
+                                    & s.i_size.isin(("petite", "petite"))
+                                )
+                                | (
+                                    (s.i_category == "Men")
+                                    & s.i_color.isin(("forest", "ghost"))
+                                    & s.i_units.isin(("Lb", "Bundle"))
+                                    & s.i_size.isin(("medium", "extra large"))
+                                )
+                            )
                         )
                     )
-                )
-            ).count()
-            > 0,
+                ).count()
+                > 0
+            ),
         )
         .select(_.i_product_name)
         .distinct()
```
<a href='https://github.com/ibis-project/ibis/blob/9126733b38e1c92f6e787f92dc9954e88ab6400d/ibis/backends/tests/tpc/ds/test_queries.py#L4491'>ibis/backends/tests/tpc/ds/test_queries.py~L4491</a>
```diff
         customer_total_return.join(customer, [("ctr_customer_sk", "c_customer_sk")])
         .join(customer_address, [("c_current_addr_sk", "ca_address_sk")])
         .filter(
-            lambda ctr1: ctr1.ctr_total_return
-            > (
-                ctr2.filter(ctr1.ctr_state == _.ctr_state).ctr_total_return.mean() * 1.2
-            ).as_scalar(),
+            lambda ctr1: (
+                ctr1.ctr_total_return
+                > (
+                    ctr2.filter(ctr1.ctr_state == _.ctr_state).ctr_total_return.mean()
+                    * 1.2
+                ).as_scalar()
+            ),
             _.ca_state == "GA",
         )
         .select(
```
<a href='https://github.com/ibis-project/ibis/blob/9126733b38e1c92f6e787f92dc9954e88ab6400d/ibis/backends/tests/tpc/ds/test_queries.py#L4913'>ibis/backends/tests/tpc/ds/test_queries.py~L4913</a>
```diff
         .filter(
             _.i_manufact_id == 350,
             _.d_date.between(date("2000-01-07"), date("2000-04-26")),
-            lambda t: t.ws_ext_discount_amt
-            > (
-                web_sales.join(date_dim, [("ws_sold_date_sk", "d_date_sk")])
-                .filter(
-                    t.i_item_sk == _.ws_item_sk,
-                    _.d_date.between(date("2000-01-07"), date("2000-04-26")),
+            lambda t: (
+                t.ws_ext_discount_amt
+                > (
+                    web_sales.join(date_dim, [("ws_sold_date_sk", "d_date_sk")])
+                    .filter(
+                        t.i_item_sk == _.ws_item_sk,
+                        _.d_date.between(date("2000-01-07"), date("2000-04-26")),
+                    )
+                    .ws_ext_discount_amt.mean()
+                    .as_scalar()
+                    * 1.3
                 )
-                .ws_ext_discount_amt.mean()
-                .as_scalar()
-                * 1.3
             ),
         )
         .select(_.ws_ext_discount_amt.sum().name("Excess Discount Amount"))
```
<a href='https://github.com/ibis-project/ibis/blob/9126733b38e1c92f6e787f92dc9954e88ab6400d/ibis/tests/benchmarks/test_benchmarks.py#L692'>ibis/tests/benchmarks/test_benchmarks.py~L692</a>
```diff
     N = 20_000_000
 
     path = str(tmp_path_factory.mktemp("duckdb") / "data.ddb")
-    sql = (
-        lambda var, table, n=N: f"""
+    sql = lambda var, table, n=N: (
+        f"""
         CREATE TABLE {table} AS
         SELECT ROW_NUMBER() OVER () AS id, {var}
         FROM (
```
<a href='https://github.com/ibis-project/ibis/blob/9126733b38e1c92f6e787f92dc9954e88ab6400d/ibis/tests/expr/test_value_exprs.py#L926'>ibis/tests/expr/test_value_exprs.py~L926</a>
```diff
         operator.gt,
         operator.ge,
         lambda left, right: ibis.timestamp("2017-04-01 00:02:34").between(left, right),
-        lambda left, right: ibis.timestamp("2017-04-01")
-        .cast(dt.date)
-        .between(left, right),
+        lambda left, right: (
+            ibis.timestamp("2017-04-01").cast(dt.date).between(left, right)
+        ),
     ],
 )
 def test_string_temporal_compare(op, left, right):
```

</p>
</details>
<details><summary><a href="https://github.com/langchain-ai/langchain">langchain-ai/langchain</a> (+46 -20 lines across 1 file)</summary>
<p>
<pre>ruff format --preview</pre>
</p>
<p>

<a href='https://github.com/langchain-ai/langchain/blob/badc0cf1b68ef21391002f0aeecbf1acedcd76c9/libs/core/tests/unit_tests/runnables/test_history.py#L53'>libs/core/tests/unit_tests/runnables/test_history.py~L53</a>
```diff
 
 def test_input_messages() -> None:
     runnable = RunnableLambda(
-        lambda messages: "you said: "
-        + "\n".join(str(m.content) for m in messages if isinstance(m, HumanMessage))
+        lambda messages: (
+            "you said: "
+            + "\n".join(str(m.content) for m in messages if isinstance(m, HumanMessage))
+        )
     )
     store: dict = {}
     get_session_history = _get_get_session_history(store=store)
```
<a href='https://github.com/langchain-ai/langchain/blob/badc0cf1b68ef21391002f0aeecbf1acedcd76c9/libs/core/tests/unit_tests/runnables/test_history.py#L82'>libs/core/tests/unit_tests/runnables/test_history.py~L82</a>
```diff
 
 async def test_input_messages_async() -> None:
     runnable = RunnableLambda(
-        lambda messages: "you said: "
-        + "\n".join(str(m.content) for m in messages if isinstance(m, HumanMessage))
+        lambda messages: (
+            "you said: "
+            + "\n".join(str(m.content) for m in messages if isinstance(m, HumanMessage))
+        )
     )
     store: dict = {}
     get_session_history = _get_get_session_history(store=store)
```
<a href='https://github.com/langchain-ai/langchain/blob/badc0cf1b68ef21391002f0aeecbf1acedcd76c9/libs/core/tests/unit_tests/runnables/test_history.py#L113'>libs/core/tests/unit_tests/runnables/test_history.py~L113</a>
```diff
 
 def test_input_dict() -> None:
     runnable = RunnableLambda(
-        lambda params: "you said: "
-        + "\n".join(
-            str(m.content) for m in params["messages"] if isinstance(m, HumanMessage)
+        lambda params: (
+            "you said: "
+            + "\n".join(
+                str(m.content)
+                for m in params["messages"]
+                if isinstance(m, HumanMessage)
+            )
         )
     )
     get_session_history = _get_get_session_history()
```
<a href='https://github.com/langchain-ai/langchain/blob/badc0cf1b68ef21391002f0aeecbf1acedcd76c9/libs/core/tests/unit_tests/runnables/test_history.py#L133'>libs/core/tests/unit_tests/runnables/test_history.py~L133</a>
```diff
 
 async def test_input_dict_async() -> None:
     runnable = RunnableLambda(
-        lambda params: "you said: "
-        + "\n".join(
-            str(m.content) for m in params["messages"] if isinstance(m, HumanMessage)
+        lambda params: (
+            "you said: "
+            + "\n".join(
+                str(m.content)
+                for m in params["messages"]
+                if isinstance(m, HumanMessage)
+            )
         )
     )
     get_session_history = _get_get_session_history()
```
<a href='https://github.com/langchain-ai/langchain/blob/badc0cf1b68ef21391002f0aeecbf1acedcd76c9/libs/core/tests/unit_tests/runnables/test_history.py#L155'>libs/core/tests/unit_tests/runnables/test_history.py~L155</a>
```diff
 
 def test_input_dict_with_history_key() -> None:
     runnable = RunnableLambda(
-        lambda params: "you said: "
-        + "\n".join(
-            [str(m.content) for m in params["history"] if isinstance(m, HumanMessage)]
-            + [params["input"]]
+        lambda params: (
+            "you said: "
+            + "\n".join(
+                [
+                    str(m.content)
+                    for m in params["history"]
+                    if isinstance(m, HumanMessage)
+                ]
+                + [params["input"]]
+            )
         )
     )
     get_session_history = _get_get_session_history()
```
<a href='https://github.com/langchain-ai/langchain/blob/badc0cf1b68ef21391002f0aeecbf1acedcd76c9/libs/core/tests/unit_tests/runnables/test_history.py#L177'>libs/core/tests/unit_tests/runnables/test_history.py~L177</a>
```diff
 
 async def test_input_dict_with_history_key_async() -> None:
     runnable = RunnableLambda(
-        lambda params: "you said: "
-        + "\n".join(
-            [str(m.content) for m in params["history"] if isinstance(m, HumanMessage)]
-            + [params["input"]]
+        lambda params: (
+            "you said: "
+            + "\n".join(
+                [
+                    str(m.content)
+                    for m in params["history"]
+                    if isinstance(m, HumanMessage)
+                ]
+                + [params["input"]]
+            )
         )
     )
     get_session_history = _get_get_session_history()
```
<a href='https://github.com/langchain-ai/langchain/blob/badc0cf1b68ef21391002f0aeecbf1acedcd76c9/libs/core/tests/unit_tests/runnables/test_history.py#L827'>libs/core/tests/unit_tests/runnables/test_history.py~L827</a>
```diff
 
 def test_get_output_messages_no_value_error() -> None:
     runnable = _RunnableLambdaWithRaiseError(
-        lambda messages: "you said: "
-        + "\n".join(str(m.content) for m in messages if isinstance(m, HumanMessage))
+        lambda messages: (
+            "you said: "
+            + "\n".join(str(m.content) for m in messages if isinstance(m, HumanMessage))
+        )
     )
     store: dict = {}
     get_session_history = _get_get_session_history(store=store)
```

</p>
</details>
<details><summary><a href="https://github.com/mlflow/mlflow">mlflow/mlflow</a> (+6 -4 lines across 2 files)</summary>
<p>
<pre>ruff format --preview</pre>
</p>
<p>

<a href='https://github.com/mlflow/mlflow/blob/b10db98924ec2d6dca7bac44e280ad73244e4f8c/mlflow/store/model_registry/file_store.py#L895'>mlflow/store/model_registry/file_store.py~L895</a>
```diff
     def _list_file_model_versions_under_path(self, path) -> list[FileModelVersion]:
         model_version_dirs = list_all(
             path,
-            filter_func=lambda x: os.path.isdir(x)
-            and os.path.basename(os.path.normpath(x)).startswith("version-"),
+            filter_func=lambda x: (
+                os.path.isdir(x) and os.path.basename(os.path.normpath(x)).startswith("version-")
+            ),
             full_path=True,
         )
         return [
```
<a href='https://github.com/mlflow/mlflow/blob/b10db98924ec2d6dca7bac44e280ad73244e4f8c/tests/ag2/test_ag2_autolog.py#L211'>tests/ag2/test_ag2_autolog.py~L211</a>
```diff
     user_proxy = ConversableAgent(
         name="tool_agent",
         llm_config=False,
-        is_termination_msg=lambda msg: msg.get("content") is not None
-        and "TERMINATE" in msg["content"],
+        is_termination_msg=lambda msg: (
+            msg.get("content") is not None and "TERMINATE" in msg["content"]
+        ),
         human_input_mode="NEVER",
     )
     assistant.register_for_llm(name="sum", description="A simple sum calculator")(sum)
```

</p>
</details>
<details><summary><a href="https://github.com/pandas-dev/pandas">pandas-dev/pandas</a> (+35 -32 lines across 10 files)</summary>
<p>
<pre>ruff format --preview</pre>
</p>
<p>

<a href='https://github.com/pandas-dev/pandas/blob/944c527c0a7488df038b545f1ff38affae2f648c/pandas/core/arrays/datetimes.py#L228'>pandas/core/arrays/datetimes.py~L228</a>
```diff
     _typ = "datetimearray"
     _internal_fill_value = np.datetime64("NaT", "ns")
     _recognized_scalars = (datetime, np.datetime64)
-    _is_recognized_dtype: Callable[[DtypeObj], bool] = lambda x: lib.is_np_dtype(
-        x, "M"
-    ) or isinstance(x, DatetimeTZDtype)
+    _is_recognized_dtype: Callable[[DtypeObj], bool] = lambda x: (
+        lib.is_np_dtype(x, "M") or isinstance(x, DatetimeTZDtype)
+    )
     _infer_matches = ("datetime", "datetime64", "date")
 
     @property
```
<a href='https://github.com/pandas-dev/pandas/blob/944c527c0a7488df038b545f1ff38affae2f648c/pandas/core/series.py#L3611'>pandas/core/series.py~L3611</a>
```diff
         More complicated user-defined functions can be used,
         as long as they expect a Series and return an array-like
 
-        >>> s.sort_values(key=lambda x: (np.tan(x.cumsum())))
+        >>> s.sort_values(key=lambda x: np.tan(x.cumsum()))
         0   -4
         3    2
         4    4
```
<a href='https://github.com/pandas-dev/pandas/blob/944c527c0a7488df038b545f1ff38affae2f648c/pandas/tests/copy_view/test_indexing.py#L482'>pandas/tests/copy_view/test_indexing.py~L482</a>
```diff
         lambda s: s["a":"c"]["a":"b"],  # type: ignore[misc]
         lambda s: s.iloc[0:3].iloc[0:2],
         lambda s: s.loc["a":"c"].loc["a":"b"],  # type: ignore[misc]
-        lambda s: s.loc["a":"c"]  # type: ignore[misc]
-        .iloc[0:3]
-        .iloc[0:2]
-        .loc["a":"b"]  # type: ignore[misc]
-        .iloc[0:1],
+        lambda s: (
+            s.loc["a":"c"]  # type: ignore[misc]
+            .iloc[0:3]
+            .iloc[0:2]
+            .loc["a":"b"]  # type: ignore[misc]
+            .iloc[0:1]
+        ),
     ],
     ids=["getitem", "iloc", "loc", "long-chain"],
 )
```
<a href='https://github.com/pandas-dev/pandas/blob/944c527c0a7488df038b545f1ff38affae2f648c/pandas/tests/frame/methods/test_shift.py#L437'>pandas/tests/frame/methods/test_shift.py~L437</a>
```diff
         # Explicit cast to float to avoid implicit cast when setting nan.
         # Column names aren't unique, so directly calling `expected.astype` won't work.
         expected = expected.pipe(
-            lambda df: df.set_axis(range(df.shape[1]), axis=1)
-            .astype({0: "float", 1: "float"})
-            .set_axis(df.columns, axis=1)
+            lambda df: (
+                df.set_axis(range(df.shape[1]), axis=1)
+                .astype({0: "float", 1: "float"})
+                .set_axis(df.columns, axis=1)
+            )
         )
         expected.iloc[:, :2] = np.nan
         expected.columns = df3.columns
```
<a href='https://github.com/pandas-dev/pandas/blob/944c527c0a7488df038b545f1ff38affae2f648c/pandas/tests/frame/methods/test_shift.py#L456'>pandas/tests/frame/methods/test_shift.py~L456</a>
```diff
         # Explicit cast to float to avoid implicit cast when setting nan.
         # Column names aren't unique, so directly calling `expected.astype` won't work.
         expected = expected.pipe(
-            lambda df: df.set_axis(range(df.shape[1]), axis=1)
-            .astype({3: "float", 4: "float"})
-            .set_axis(df.columns, axis=1)
+            lambda df: (
+                df.set_axis(range(df.shape[1]), axis=1)
+                .astype({3: "float", 4: "float"})
+                .set_axis(df.columns, axis=1)
+            )
         )
         expected.iloc[:, -2:] = np.nan
         expected.columns = df3.columns
```
<a href='https://github.com/pandas-dev/pandas/blob/944c527c0a7488df038b545f1ff38affae2f648c/pandas/tests/frame/methods/test_to_csv.py#L145'>pandas/tests/frame/methods/test_to_csv.py~L145</a>
```diff
         timezone_frame.to_csv(path)
         result = read_csv(path, index_col=0, parse_dates=["A"])
 
-        converter = (
-            lambda c: to_datetime(result[c])
+        converter = lambda c: (
+            to_datetime(result[c])
             .dt.tz_convert("UTC")
             .dt.tz_convert(timezone_frame[c].dt.tz)
             .dt.as_unit("ns")
```
<a href='https://github.com/pandas-dev/pandas/blob/944c527c0a7488df038b545f1ff38affae2f648c/pandas/tests/io/parser/test_converters.py#L86'>pandas/tests/io/parser/test_converters.py~L86</a>
```diff
 1;1521,1541;187101,9543;ABC;poi;4,7387
 2;121,12;14897,76;DEF;uyt;0,3773
 3;878,158;108013,434;GHI;rez;2,7356"""
-    converters["Number1"] = converters["Number2"] = converters["Number3"] = (
-        lambda x: float(x.replace(",", "."))
+    converters["Number1"] = converters["Number2"] = converters["Number3"] = lambda x: (
+        float(x.replace(",", "."))
     )
 
     if parser.engine == "pyarrow":
```
<a href='https://github.com/pandas-dev/pandas/blob/944c527c0a7488df038b545f1ff38affae2f648c/pandas/tests/reshape/merge/test_merge_asof.py#L1890'>pandas/tests/reshape/merge/test_merge_asof.py~L1890</a>
```diff
         tm.assert_frame_equal(result, expected)
 
     def test_basic_no_by(self, trades, asof, quotes):
-        f = (
-            lambda x: x[x.ticker == "MSFT"]
-            .drop("ticker", axis=1)
-            .reset_index(drop=True)
+        f = lambda x: (
+            x[x.ticker == "MSFT"].drop("ticker", axis=1).reset_index(drop=True)
         )
 
         # just use a single ticker
```
<a href='https://github.com/pandas-dev/pandas/blob/944c527c0a7488df038b545f1ff38affae2f648c/pandas/tests/series/indexing/test_where.py#L233'>pandas/tests/series/indexing/test_where.py~L233</a>
```diff
     # GH 2702
     # make sure correct exceptions are raised on invalid list assignment
 
-    msg = (
-        lambda x: f"cannot set using a {x} indexer with a "
-        "different length than the value"
+    msg = lambda x: (
+        f"cannot set using a {x} indexer with a different length than the value"
     )
     # slice
     s = Series(list("abc"), dtype=object)
```
<a href='https://github.com/pandas-dev/pandas/blob/944c527c0a7488df038b545f1ff38affae2f648c/pandas/tests/window/test_expanding.py#L457'>pandas/tests/window/test_expanding.py~L457</a>
```diff
 @pytest.mark.parametrize(
     "f",
     [
-        lambda x: (x.expanding(min_periods=5).cov(x, pairwise=True)),
-        lambda x: (x.expanding(min_periods=5).corr(x, pairwise=True)),
+        lambda x: x.expanding(min_periods=5).cov(x, pairwise=True),
+        lambda x: x.expanding(min_periods=5).corr(x, pairwise=True),
     ],
 )
 def test_moment_functions_zero_length_pairwise(f):
```
<a href='https://github.com/pandas-dev/pandas/blob/944c527c0a7488df038b545f1ff38affae2f648c/pandas/tests/window/test_pairwise.py#L169'>pandas/tests/window/test_pairwise.py~L169</a>
```diff
 @pytest.mark.parametrize(
     "f",
     [
-        lambda x: (x.rolling(window=10, min_periods=5).cov(x, pairwise=True)),
-        lambda x: (x.rolling(window=10, min_periods=5).corr(x, pairwise=True)),
+        lambda x: x.rolling(window=10, min_periods=5).cov(x, pairwise=True),
+        lambda x: x.rolling(window=10, min_periods=5).corr(x, pairwise=True),
     ],
 )
 def test_rolling_functions_window_non_shrinkage_binary(f):
```
<a href='https://github.com/pandas-dev/pandas/blob/944c527c0a7488df038b545f1ff38affae2f648c/pandas/tests/window/test_pairwise.py#L192'>pandas/tests/window/test_pairwise.py~L192</a>
```diff
 @pytest.mark.parametrize(
     "f",
     [
-        lambda x: (x.rolling(window=10, min_periods=5).cov(x, pairwise=True)),
-        lambda x: (x.rolling(window=10, min_periods=5).corr(x, pairwise=True)),
+        lambda x: x.rolling(window=10, min_periods=5).cov(x, pairwise=True),
+        lambda x: x.rolling(window=10, min_periods=5).corr(x, pairwise=True),
     ],
 )
 def test_moment_functions_zero_length_pairwise(f):
```

</p>
</details>
<details><summary><a href="https://github.com/prefecthq/prefect">prefecthq/prefect</a> (+439 -441 lines across 4 files)</summary>
<p>
<pre>ruff format --preview</pre>
</p>
<p>

<a href='https://github.com/prefecthq/prefect/blob/a0ae3b08f4b4b4b5727d33aeb8beb7766f894b86/src/integrations/prefect-gcp/tests/conftest.py#L55'>src/integrations/prefect-gcp/tests/conftest.py~L55</a>
```diff
 @pytest.fixture
 def oauth2_credentials(monkeypatch):
     CredentialsMock = MagicMock()
-    CredentialsMock.from_service_account_info.side_effect = (
-        lambda json, scopes: MagicMock(scopes=scopes, **json)
+    CredentialsMock.from_service_account_info.side_effect = lambda json, scopes: (
+        MagicMock(scopes=scopes, **json)
     )
     CredentialsMock.from_service_account_file.side_effect = lambda file, scopes: file
     monkeypatch.setattr("prefect_gcp.credentials.Credentials", CredentialsMock)
```
<a href='https://github.com/prefecthq/prefect/blob/a0ae3b08f4b4b4b5727d33aeb8beb7766f894b86/src/integrations/prefect-gcp/tests/conftest.py#L87'>src/integrations/prefect-gcp/tests/conftest.py~L87</a>
```diff
     def get_bucket(self, bucket):
         blob_obj = MagicMock()
         blob_obj.download_as_bytes.return_value = b"bytes"
-        blob_obj.download_to_file.side_effect = (
-            lambda file_obj, **kwargs: file_obj.write(b"abcdef")
+        blob_obj.download_to_file.side_effect = lambda file_obj, **kwargs: (
+            file_obj.write(b"abcdef")
         )
         blob_obj.download_to_filename.side_effect = lambda filename, **kwargs: Path(
             filename
```
<a href='https://github.com/prefecthq/prefect/blob/a0ae3b08f4b4b4b5727d33aeb8beb7766f894b86/src/integrations/prefect-kubernetes/tests/test_worker.py#L273'>src/integrations/prefect-kubernetes/tests/test_worker.py~L273</a>
```diff
             pod_watch_timeout_seconds=60,
             stream_output=True,
         ),
-        lambda flow_run,
-        deployment,
-        flow,
-        work_pool,
-        worker_name: KubernetesWorkerJobConfiguration(
-            command="prefect flow-run execute",
-            env={
-                **get_current_settings().to_environment_variables(exclude_unset=True),
-                "PREFECT__FLOW_RUN_ID": str(flow_run.id),
-                "PREFECT_FLOW_RUN_EXECUTE_SIGTERM_BEHAVIOR": "reschedule",
-            },
-            labels={
-                "prefect.io/flow-run-id": str(flow_run.id),
-                "prefect.io/flow-run-name": flow_run.name,
-                "prefect.io/version": _slugify_label_value(
-                    prefect.__version__.split("+")[0]
-                ),
-                "prefect.io/deployment-id": str(deployment.id),
-                "prefect.io/deployment-name": deployment.name,
-                "prefect.io/flow-id": str(flow.id),
-                "prefect.io/flow-name": flow.name,
-                "prefect.io/worker-name": worker_name,
-                "prefect.io/work-pool-name": work_pool.name,
-                "prefect.io/work-pool-id": str(work_pool.id),
-            },
-            name=flow_run.name,
-            namespace="default",
-            job_manifest={
-                "apiVersion": "batch/v1",
-                "kind": "Job",
-                "metadata": {
-                    "namespace": "default",
-                    "generateName": f"{flow_run.name}-",
-                    "labels": {
-                        "prefect.io/flow-run-id": str(flow_run.id),
-                        "prefect.io/flow-run-name": flow_run.name,
-                        "prefect.io/version": _slugify_label_value(
-                            prefect.__version__.split("+")[0]
-                        ),
-                        "prefect.io/deployment-id": str(deployment.id),
-                        "prefect.io/deployment-name": deployment.name,
-                        "prefect.io/flow-id": str(flow.id),
-                        "prefect.io/flow-name": flow.name,
-                        "prefect.io/worker-name": worker_name,
-                        "prefect.io/work-pool-name": work_pool.name,
-                        "prefect.io/work-pool-id": str(work_pool.id),
-                    },
+        lambda flow_run, deployment, flow, work_pool, worker_name: (
+            KubernetesWorkerJobConfiguration(
+                command="prefect flow-run execute",
+                env={
+                    **get_current_settings().to_environment_variables(
+                        exclude_unset=True
+                    ),
+                    "PREFECT__FLOW_RUN_ID": str(flow_run.id),
+                    "PREFECT_FLOW_RUN_EXECUTE_SIGTERM_BEHAVIOR": "reschedule",
                 },
-                "spec": {
-                    "backoffLimit": 0,
-                    "template": {
-                        "metadata": {
-                            "labels": {
-                                "prefect.io/flow-run-id": str(flow_run.id),
-                                "prefect.io/flow-run-name": flow_run.name,
-                                "prefect.io/version": _slugify_label_value(
-                                    prefect.__version__.split("+")[0]
-                                ),
-                                "prefect.io/deployment-id": str(deployment.id),
-                                "prefect.io/deployment-name": deployment.name,
-                                "prefect.io/flow-id": str(flow.id),
-                                "prefect.io/flow-name": flow.name,
-                                "prefect.io/worker-name": worker_name,
-                                "prefect.io/work-pool-name": work_pool.name,
-                                "prefect.io/work-pool-id": str(work_pool.id),
-                            },
+                labels={
+                    "prefect.io/flow-run-id": str(flow_run.id),
+                    "prefect.io/flow-run-name": flow_run.name,
+                    "prefect.io/version": _slugify_label_value(
+                        prefect.__version__.split("+")[0]
+                    ),
+                    "prefect.io/deployment-id": str(deployment.id),
+                    "prefect.io/deployment-name": deployment.name,
+                    "prefect.io/flow-id": str(flow.id),
+                    "prefect.io/flow-name": flow.name,
+                    "prefect.io/worker-name": worker_name,
+                    "prefect.io/work-pool-name": work_pool.name,
+                    "prefect.io/work-pool-id": str(work_pool.id),
+                },
+                name=flow_run.name,
+                namespace="default",
+                job_manifest={
+                    "apiVersion": "batch/v1",
+                    "kind": "Job",
+                    "metadata": {
+                        "namespace": "default",
+                        "generateName": f"{flow_run.name}-",
+                        "labels": {
+                            "prefect.io/flow-run-id": str(flow_run.id),
+                            "prefect.io/flow-run-name": flow_run.name,
+                            "prefect.io/version": _slugify_label_value(
+                                prefect.__version__.split("+")[0]
+                            ),
+                            "prefect.io/deployment-id": str(deployment.id),
+                            "prefect.io/deployment-name": deployment.name,
+                            "prefect.io/flow-id": str(flow.id),
+                            "prefect.io/flow-name": flow.name,
+                            "prefect.io/worker-name": worker_name,
+                            "prefect.io/work-pool-name": work_pool.name,
+                            "prefect.io/work-pool-id": str(work_pool.id),
                         },
-                        "spec": {
-                            "parallelism": 1,
-                            "completions": 1,
-                            "restartPolicy": "Never",
-                            "containers": [
-                                {
-                                    "name": "prefect-job",
-                                    "imagePullPolicy": "IfNotPresent",
-                                    "env": [
-                                        *[
-                                            {"name": k, "value": v}
-                                            for k, v in get_current_settings()
-                                            .to_environment_variables(
-                                                exclude_unset=True
-                                            )
-                                            .items()
+                    },
+                    "spec": {
+                        "backoffLimit": 0,
+                        "template": {
+                            "metadata": {
+                                "labels": {
+                                    "prefect.io/flow-run-id": str(flow_run.id),
+                                    "prefect.io/flow-run-name": flow_run.name,
+                                    "prefect.io/version": _slugify_label_value(
+                                        prefect.__version__.split("+")[0]
+                                    ),
+                                    "prefect.io/deployment-id": str(deployment.id),
+                                    "prefect.io/deployment-name": deployment.name,
+                                    "prefect.io/flow-id": str(flow.id),
+                                    "prefect.io/flow-name": flow.name,
+                                    "prefect.io/worker-name": worker_name,
+                                    "prefect.io/work-pool-name": work_pool.name,
+                                    "prefect.io/work-pool-id": str(work_pool.id),
+                                },
+                            },
+                            "spec": {
+                                "parallelism": 1,
+                                "completions": 1,
+                                "restartPolicy": "Never",
+                                "containers": [
+                                    {
+                                        "name": "prefect-job",
+                                        "imagePullPolicy": "IfNotPresent",
+                                        "env": [
+                                            *[
+                                                {"name": k, "value": v}
+                                                for k, v in get_current_settings()
+                                                .to_environment_variables(
+                                                    exclude_unset=True
+                                                )
+                                                .items()
+                                            ],
+                                            {
+                                                "name": "PREFECT__FLOW_RUN_ID",
+                                                "value": str(flow_run.id),
+                                            },
+                                            {
+                                                "name": "PREFECT_FLOW_RUN_EXECUTE_SIGTERM_BEHAVIOR",
+                                                "value": "reschedule",
+                                            },
                                         ],
-                                        {
-                                            "name": "PREFECT__FLOW_RUN_ID",
-                                            "value": str(flow_run.id),
-                                        },
-                                        {
-                                            "name": "PREFECT_FLOW_RUN_EXECUTE_SIGTERM_BEHAVIOR",
-                                            "value": "reschedule",
-                                        },
-                                    ],
-                                    "image": get_prefect_image_name(),
-                                    "args": [
-                                        "prefect",
-                                        "flow-run",
-                                        "execute",
-                                    ],
-                                }
-                            ],
+                                        "image": get_prefect_image_name(),
+                                        "args": [
+                                            "prefect",
+                                            "flow-run",
+                                            "execute",
+                                        ],
+                                    }
+                                ],
+                            },
                         },
                     },
                 },
-            },
-            cluster_config=None,
-            job_watch_timeout_seconds=None,
-            pod_watch_timeout_seconds=60,
-            stream_output=True,
+                cluster_config=None,
+                job_watch_timeout_seconds=None,
+                pod_watch_timeout_seconds=60,
+                stream_output=True,
+            )
         ),
     ),
     (
```
<a href='https://github.com/prefecthq/prefect/blob/a0ae3b08f4b4b4b5727d33aeb8beb7766f894b86/src/integrations/prefect-kubernetes/tests/test_worker.py#L589'>src/integrations/prefect-kubernetes/tests/test_worker.py~L589</a>
```diff
             pod_watch_timeout_seconds=60,
             stream_output=True,
         ),
-        lambda flow_run,
-        deployment,
-        flow,
-        work_pool,
-        worker_name: KubernetesWorkerJobConfiguration(
-            command="prefect flow-run execute",
-            env={
-                **get_current_settings().to_environment_variables(exclude_unset=True),
-                "PREFECT__FLOW_RUN_ID": str(flow_run.id),
-                "PREFECT_FLOW_RUN_EXECUTE_SIGTERM_BEHAVIOR": "reschedule",
-            },
-            labels={
-                "prefect.io/flow-run-id": str(flow_run.id),
-                "prefect.io/flow-run-name": flow_run.name,
-                "prefect.io/version": _slugify_label_value(
-                    prefect.__version__.split("+")[0]
-                ),
-                "prefect.io/deployment-id": str(deployment.id),
-                "prefect.io/deployment-name": deployment.name,
-                "prefect.io/flow-id": str(flow.id),
-                "prefect.io/flow-name": flow.name,
-                "prefect.io/worker-name": worker_name,
-                "prefect.io/work-pool-name": work_pool.name,
-                "prefect.io/work-pool-id": str(work_pool.id),
-            },
-            name=flow_run.name,
-            namespace="default",
-            job_manifest={
-                "apiVersion": "batch/v1",
-                "kind": "Job",
-                "metadata": {
-                    "namespace": "default",
-                    "generateName": f"{flow_run.name}-",
-                    "labels": {
-                        "prefect.io/flow-run-id": str(flow_run.id),
-                        "prefect.io/flow-run-name": flow_run.name,
-                        "prefect.io/version": _slugify_label_value(
-                            prefect.__version__.split("+")[0]
-                        ),
-                        "prefect.io/deployment-id": str(deployment.id),
-                        "prefect.io/deployment-name": deployment.name,
-                        "prefect.io/flow-id": str(flow.id),
-                        "prefect.io/flow-name": flow.name,
-                        "prefect.io/worker-name": worker_name,
-                        "prefect.io/work-pool-name": work_pool.name,
-                        "prefect.io/work-pool-id": str(work_pool.id),
-                    },
+        lambda flow_run, deployment, flow, work_pool, worker_name: (
+            KubernetesWorkerJobConfiguration(
+                command="prefect flow-run execute",
+                env={
+                    **get_current_settings().to_environment_variables(
+                        exclude_unset=True
+                    ),
+                    "PREFECT__FLOW_RUN_ID": str(flow_run.id),
+                    "PREFECT_FLOW_RUN_EXECUTE_SIGTERM_BEHAVIOR": "reschedule",
                 },
-                "spec": {
-                    "backoffLimit": 0,
-                    "template": {
-                        "metadata": {
-                            "labels": {
-                                "prefect.io/flow-run-id": str(flow_run.id),
-                                "prefect.io/flow-run-name": flow_run.name,
-                                "prefect.io/version": _slugify_label_value(
-                                    prefect.__version__.split("+")[0]
-                                ),
-                                "prefect.io/deployment-id": str(deployment.id),
-                                "prefect.io/deployment-name": deployment.name,
-                                "prefect.io/flow-id": str(flow.id),
-                                "prefect.io/flow-name": flow.name,
-                                "prefect.io/worker-name": worker_name,
-                                "prefect.io/work-pool-name": work_pool.name,
-                                "prefect.io/work-pool-id": str(work_pool.id),
-                            },
+                labels={
+                    "prefect.io/flow-run-id": str(flow_run.id),
+                    "prefect.io/flow-run-name": flow_run.name,
+                    "prefect.io/version": _slugify_label_value(
+                        prefect.__version__.split("+")[0]
+                    ),
+                    "prefect.io/deployment-id": str(deployment.id),
+                    "prefect.io/deployment-name": deployment.name,
+                    "prefect.io/flow-id": str(flow.id),
+                    "prefect.io/flow-name": flow.name,
+                    "prefect.io/worker-name": worker_name,
+                    "prefect.io/work-pool-name": work_pool.name,
+                    "prefect.io/work-pool-id": str(work_pool.id),
+                },
+                name=flow_run.name,
+                namespace="default",
+                job_manifest={
+                    "apiVersion": "batch/v1",
+                    "kind": "Job",
+                    "metadata": {
+                        "namespace": "default",
+                        "generateName": f"{flow_run.name}-",
+                        "labels": {
+                            "prefect.io/flow-run-id": str(flow_run.id),
+                            "prefect.io/flow-run-name": flow_run.name,
+                            "prefect.io/version": _slugify_label_value(
+                                prefect.__version__.split("+")[0]
+                            ),
+                            "prefect.io/deployment-id": str(deployment.id),
+                            "prefect.io/deployment-name": deployment.name,
+                            "prefect.io/flow-id": str(flow.id),
+                            "prefect.io/flow-name": flow.name,
+                            "prefect.io/worker-name": worker_name,
+                            "prefect.io/work-pool-name": work_pool.name,
+                            "prefect.io/work-pool-id": str(work_pool.id),
                         },
-                        "spec": {
-                            "parallelism": 1,
-                            "completions": 1,
-                            "restartPolicy": "Never",
-                            "containers": [
-                                {
-                                    "name": "prefect-job",
-                                    "imagePullPolicy": "IfNotPresent",
-                                    "env": [
-                                        *[
-                                            {"name": k, "value": v}
-                                            for k, v in get_current_settings()
-                                            .to_environment_variables(
-                                                exclude_unset=True
-                                            )
-                                            .items()
-                                        ],
-                                        {
-                                            "name": "PREFECT__FLOW_RUN_ID",
-                                            "value": str(flow_run.id),
-                                        },
-                                        {
-                                            "name": "PREFECT_FLOW_RUN_EXECUTE_SIGTERM_BEHAVIOR",
-                                            "value": "reschedule",
-                                        },
-                                        {
-                                            "name": "TEST_ENV",
-                                            "valueFrom": {
-                                                "secretKeyRef": {
-                                                    "name": "test-secret",
-                                                    "key": "shhhhh",
-                                                }
+                    },
+                    "spec": {
+                        "backoffLimit": 0,
+                        "template": {
+                            "metadata": {
+                                "labels": {
+                                    "prefect.io/flow-run-id": str(flow_run.id),
+                                    "prefect.io/flow-run-name": flow_run.name,
+                                    "prefect.io/version": _slugify_label_value(
+                                        prefect.__version__.split("+")[0]
+                                    ),
+                                    "prefect.io/deployment-id": str(deployment.id),
+                                    "prefect.io/deployment-name": deployment.name,
+                                    "prefect.io/flow-id": str(flow.id),
+                                    "prefect.io/flow-name": flow.name,
+                                    "prefect.io/worker-name": worker_name,
+                                    "prefect.io/work-pool-name": work_pool.name,
+                                    "prefect.io/work-pool-id": str(work_pool.id),
+                                },
+                            },
+                            "spec": {
+                                "parallelism": 1,
+                                "completions": 1,
+                                "restartPolicy": "Never",
+                                "containers": [
+                                    {
+                                        "name": "prefect-job",
+                                        "imagePullPolicy": "IfNotPresent",
+                                        "env": [
+                                            *[
+                                                {"name": k, "value": v}
+                                                for k, v in get_current_settings()
+                                                .to_environment_variables(
+                                                    exclude_unset=True
+                                                )
+                                                .items()
+                                            ],
+                                            {
+                                                "name": "PREFECT__FLOW_RUN_ID",
+                                                "value": str(flow_run.id),
                                             },
-                                        },
-                                    ],
-                                    "image": get_prefect_image_name(),
-                                    "args": [
-                                        "prefect",
-                                        "flow-run",
-                                        "execute",
-                                    ],
-                                }
-                            ],
+                                            {
+                                                "name": "PREFECT_FLOW_RUN_EXECUTE_SIGTERM_BEHAVIOR",
+                                                "value": "reschedule",
+                                            },
+                                            {
+                                                "name": "TEST_ENV",
+                                                "valueFrom": {
+                                                    "secretKeyRef": {
+                                                        "name": "test-secret",
+                                                        "key": "shhhhh",
+                                                    }
+                                                },
+                                            },
+                                        ],
+                                        "image": get_prefect_image_name(),
+                                        "args": [
+                                            "prefect",
+                                            "flow-run",
+                                            "execute",
+                                        ],
+                                    }
+                                ],
+                            },
                         },
                     },
                 },
-            },
-            cluster_config=None,
-            job_watch_timeout_seconds=None,
-            pod_watch_timeout_seconds=60,
-            stream_output=True,
+                cluster_config=None,
+                job_watch_timeout_seconds=None,
+                pod_watch_timeout_seconds=60,
+                stream_output=True,
+            )
         ),
     ),
     (
```
<a href='https://github.com/prefecthq/prefect/blob/a0ae3b08f4b4b4b5727d33aeb8beb7766f894b86/src/integrations/prefect-kubernetes/tests/test_worker.py#L778'>src/integrations/prefect-kubernetes/tests/test_worker.py~L778</a>
```diff
             pod_watch_timeout_seconds=90,
             stream_output=False,
         ),
-        lambda flow_run,
-        deployment,
-        flow,
-        work_pool,
-        worker_name: KubernetesWorkerJobConfiguration(
-            command="echo hello",
-            env={
-                **get_current_settings().to_environment_variables(exclude_unset=True),
-                "PREFECT__FLOW_RUN_ID": str(flow_run.id),
-                "TEST_ENV": "test",
-            },
-            labels={
-                "prefect.io/flow-run-id": str(flow_run.id),
-                "prefect.io/flow-run-name": flow_run.name,
-                "prefect.io/version": _slugify_label_value(
-                    prefect.__version__.split("+")[0]
-                ),
-                "prefect.io/deployment-id": str(deployment.id),
-                "prefect.io/deployment-name": deployment.name,
-                "prefect.io/flow-id": str(flow.id),
-                "prefect.io/flow-name": flow.name,
-                "prefect.io/worker-name": worker_name,
-                "prefect.io/work-pool-name": work_pool.name,
-                "prefect.io/work-pool-id": str(work_pool.id),
-                "TEST_LABEL": "test label",
-            },
-            name="test",
-            namespace="test-namespace",
-            job_manifest={
-                "apiVersion": "batch/v1",
-                "kind": "Job",
-                "metadata": {
-                    "namespace": "test-namespace",
-                    "generateName": "test-",
-                    "labels": {
-                        "prefect.io/flow-run-id": str(flow_run.id),
-                        "prefect.io/flow-run-name": flow_run.name,
-                        "prefect.io/version": _slugify_label_value(
-                            prefect.__version__.split("+")[0]
-                        ),
-                        "prefect.io/deployment-id": str(deployment.id),
-                        "prefect.io/deployment-name": deployment.name,
-                        "prefect.io/flow-id": str(flow.id),
-                        "prefect.io/flow-name": flow.name,
-                        "prefect.io/worker-name": worker_name,
-                        "prefect.io/work-pool-name": work_pool.name,
-                        "prefect.io/work-pool-id": str(work_pool.id),
-                        "test_label": "test-label",
-                    },
+        lambda flow_run, deployment, flow, work_pool, worker_name: (
+            KubernetesWorkerJobConfiguration(
+                command="echo hello",
+                env={
+                    **get_current_settings().to_environment_variables(
+                        exclude_unset=True
+                    ),
+                    "PREFECT__FLOW_RUN_ID": str(flow_run.id),
+                    "TEST_ENV": "test",
                 },
-                "spec": {
-                    "backoffLimit": 6,
-                    "ttlSecondsAfterFinished": 60,
-                    "template": {
-                        "metadata": {
-                            "labels": {
-                                "prefect.io/flow-run-id": str(flow_run.id),
-                                "prefect.io/flow-run-name": flow_run.name,
-                                "prefect.io/version": _slugify_label_value(
-                                    prefect.__version__.split("+")[0]
-                                ),
-                                "prefect.io/deployment-id": str(deployment.id),
-                                "prefect.io/deployment-name": deployment.name,
-                                "prefect.io/flow-id": str(flow.id),
-                                "prefect.io/flow-name": flow.name,
-                                "prefect.io/worker-name": worker_name,
-                                "prefect.io/work-pool-name": work_pool.name,
-                                "prefect.io/work-pool-id": str(work_pool.id),
-                                "test_label": "test-label",
-                            },
+                labels={
+                    "prefect.io/flow-run-id": str(flow_run.id),
+                    "prefect.io/flow-run-name": flow_run.name,
+                    "prefect.io/version": _slugify_label_value(
+                        prefect.__version__.split("+")[0]
+                    ),
+                    "prefect.io/deployment-id": str(deployment.id),
+                    "prefect.io/deployment-name": deployment.name,
+                    "prefect.io/flow-id": str(flow.id),
+                    "prefect.io/flow-name": flow.name,
+                    "prefect.io/worker-name": worker_name,
+                    "prefect.io/work-pool-name": work_pool.name,
+                    "prefect.io/work-pool-id": str(work_pool.id),
+                    "TEST_LABEL": "test label",
+                },
+                name="test",
+                namespace="test-namespace",
+                job_manifest={
+                    "apiVersion": "batch/v1",
+                    "kind": "Job",
+                    "metadata": {
+                        "namespace": "test-namespace",
+                        "generateName": "test-",
+                        "labels": {
+                            "prefect.io/flow-run-id": str(flow_run.id),
+                            "prefect.io/flow-run-name": flow_run.name,
+                            "prefect.io/version": _slugify_label_value(
+                                prefect.__version__.split("+")[0]
+                            ),
+                            "prefect.io/deployment-id": str(deployment.id),
+                            "prefect.io/deployment-name": deployment.name,
+                            "prefect.io/flow-id": str(flow.id),
+                            "prefect.io/flow-name": flow.name,
+                            "prefect.io/worker-name": worker_name,
+                            "prefect.io/work-pool-name": work_pool.name,
+                            "prefect.io/work-pool-id": str(work_pool.id),
+                            "test_label": "test-label",
                         },
-                        "spec": {
-                            "parallelism": 1,
-                            "completions": 1,
-                            "restartPolicy": "Never",
-                            "serviceAccountName": "test-service-account",
-                            "containers": [
-                                {
-                                    "name": "prefect-job",
-                                    "imagePullPolicy": "Always",
-                                    "env": [
-                                        *[
-                                            {"name": k, "value": v}
-                                            for k, v in get_current_settings()
-                                            .to_environment_variables(
-                                                exclude_unset=True
-                                            )
-                                            .items()
+                    },
+                    "spec": {
+                        "backoffLimit": 6,
+                        "ttlSecondsAfterFinished": 60,
+                        "template": {
+                            "metadata": {
+                                "labels": {
+                                    "prefect.io/flow-run-id": str(flow_run.id),
+                                    "prefect.io/flow-run-name": flow_run.name,
+                                    "prefect.io/version": _slugify_label_value(
+                                        prefect.__version__.split("+")[0]
+                                    ),
+                                    "prefect.io/deployment-id": str(deployment.id),
+                                    "prefect.io/deployment-name": deployment.name,
+                                    "prefect.io/flow-id": str(flow.id),
+                                    "prefect.io/flow-name": flow.name,
+                                    "prefect.io/worker-name": worker_name,
+                                    "prefect.io/work-pool-name": work_pool.name,
+                                    "prefect.io/work-pool-id": str(work_pool.id),
+                                    "test_label": "test-label",
+                                },
+                            },
+                            "spec": {
+                                "parallelism": 1,
+                                "completions": 1,
+                                "restartPolicy": "Never",
+                                "serviceAccountName": "test-service-account",
+                                "containers": [
+                                    {
+                                        "name": "prefect-job",
+                                        "imagePullPolicy": "Always",
+                                        "env": [
+                                            *[
+                                                {"name": k, "value": v}
+                                                for k, v in get_current_settings()
+                                                .to_environment_variables(
+                                                    exclude_unset=True
+                                                )
+                                                .items()
+                                            ],
+                                            {
+                                                "name": "PREFECT__FLOW_RUN_ID",
+                                                "value": str(flow_run.id),
+                                            },
+                                            {
+                                                "name": "TEST_ENV",
+                                                "value": "test",
+                                            },
                                         ],
-                                        {
-                                            "name": "PREFECT__FLOW_RUN_ID",
-                                            "value": str(flow_run.id),
-                                        },
-                                        {
-                                            "name": "TEST_ENV",
-                                            "value": "test",
-                                        },
-                                    ],
-                                    "image": "test-image:latest",
-                                    "args": ["echo", "hello"],
-                                }
-                            ],
+                                        "image": "test-image:latest",
+                                        "args": ["echo", "hello"],
+                                    }
+                                ],
+                            },
                         },
                     },
                 },
-            },
-            cluster_config=None,
-            job_watch_timeout_seconds=120,
-            pod_watch_timeout_seconds=90,
-            stream_output=False,
+                cluster_config=None,
+                job_watch_timeout_seconds=120,
+                pod_watch_timeout_seconds=90,
+                stream_output=False,
+            )
         ),
     ),
     # custom template with values
```
<a href='https://github.com/prefecthq/prefect/blob/a0ae3b08f4b4b4b5727d33aeb8beb7766f894b86/src/integrations/prefect-kubernetes/tests/test_worker.py#L1099'>src/integrations/prefect-kubernetes/tests/test_worker.py~L1099</a>
```diff
             pod_watch_timeout_seconds=90,
             stream_output=True,
         ),
-        lambda flow_run,
-        deployment,
-        flow,
-        work_pool,
-        worker_name: KubernetesWorkerJobConfiguration(
-            command="echo hello",
-            env={
-                **get_current_settings().to_environment_variables(exclude_unset=True),
-                "PREFECT__FLOW_RUN_ID": str(flow_run.id),
-                "TEST_ENV": "test",
-            },
-            labels={
-                "prefect.io/flow-run-id": str(flow_run.id),
-                "prefect.io/flow-run-name": flow_run.name,
-                "prefect.io/version": prefect.__version__.split("+")[0],
-                "prefect.io/deployment-id": str(deployment.id),
-                "prefect.io/deployment-name": deployment.name,
-                "prefect.io/flow-id": str(flow.id),
-                "prefect.io/flow-name": flow.name,
-                "prefect.io/worker-name": worker_name,
-                "prefect.io/work-pool-name": work_pool.name,
-                "prefect.io/work-pool-id": str(work_pool.id),
-                "TEST_LABEL": "test label",
-            },
-            name="test",
-            namespace="default",
-            job_manifest={
-                "apiVersion": "batch/v1",
-                "kind": "Job",
-                "metadata": {
-                    "namespace": "default",
-                    "generateName": "test-",
-                    "labels": {
-                        "prefect.io/flow-run-id": str(flow_run.id),
-                        "prefect.io/flow-run-name": flow_run.name,
-                        "prefect.io/version": _slugify_label_value(
-                            prefect.__version__.split("+")[0]
-                        ),
-                        "prefect.io/deployment-id": str(deployment.id),
-                        "prefect.io/deployment-name": deployment.name,
-                        "prefect.io/flow-id": str(flow.id),
-                        "prefect.io/flow-name": flow.name,
-                        "prefect.io/worker-name": worker_name,
-                        "prefect.io/work-pool-name": work_pool.name,
-                        "prefect.io/work-pool-id": str(work_pool.id),
-                        "test_label": "test-label",
-                    },
+        lambda flow_run, deployment, flow, work_pool, worker_name: (
+            KubernetesWorkerJobConfiguration(
+                command="echo hello",
+                env={
+                    **get_current_settings().to_environment_variables(
+                        exclude_unset=True
+                    ),
+                    "PREFECT__FLOW_RUN_ID": str(flow_run.id),
+                    "TEST_ENV": "test",
                 },
-                "spec": {
-                    "template": {
-                        "metadata": {
-                            "other_metadata": "other-metadata",
-                            "labels": {
-                                "prefect.io/flow-run-id": str(flow_run.id),
-                                "prefect.io/flow-run-name": flow_run.name,
-                                "prefect.io/version": _slugify_label_value(
-                                    prefect.__version__.split("+")[0]
-                                ),
-                                "prefect.io/deployment-id": str(deployment.id),
-                                "prefect.io/deployment-name": deployment.name,
-                                "prefect.io/flow-id": str(flow.id),
-                                "prefect.io/flow-name": flow.name,
-                                "prefect.io/worker-name": worker_name,
-                                "prefect.io/work-pool-name": work_pool.name,
-                                "prefect.io/work-pool-id": str(work_pool.id),
-                                "test_label": "test-label",
-                                "label_from_template": "label-from-template",
-                            },
+                labels={
+                    "prefect.io/flow-run-id": str(flow_run.id),
+                    "prefect.io/flow-run-name": flow_run.name,
+                    "prefect.io/version": prefect.__version__.split("+")[0],
+                    "prefect.io/deployment-id": str(deployment.id),
+                    "prefect.io/deployment-name": deployment.name,
+                    "prefect.io/flow-id": str(flow.id),
+                    "prefect.io/flow-name": flow.name,
+                    "prefect.io/worker-name": worker_name,
+                    "prefect.io/work-pool-name": work_pool.name,
+                    "prefect.io/work-pool-id": str(work_pool.id),
+                    "TEST_LABEL": "test label",
+                },
+                name="test",
+                namespace="default",
+                job_manifest={
+                    "apiVersion": "batch/v1",
+                    "kind": "Job",
+                    "metadata": {
+                        "namespace": "default",
+                        "generateName": "test-",
+                        "labels": {
+                            "prefect.io/flow-run-id": str(flow_run.id),
+                            "prefect.io/flow-run-name": flow_run.name,
+                            "prefect.io/version": _slugify_label_value(
+                                prefect.__version__.split("+")[0]
+                            ),
+                            "prefect.io/deployment-id": str(deployment.id),
+                            "prefect.io/deployment-name": deployment.name,
+                            "prefect.io/flow-id": str(flow.id),
+                            "prefect.io/flow-name": flow.name,
+                            "prefect.io/worker-name": worker_name,
+                            "prefect.io/work-pool-name": work_pool.name,
+                            "prefect.io/work-pool-id": str(work_pool.id),
+                            "test_label": "test-label",
                         },
-                        "spec": {
-                            "parallelism": 1,
-                            "completions": 1,
-                            "restartPolicy": "Never",
-                            "containers": [
-                                {
-                                    "name": "prefect-job",
-                                    "imagePullPolicy": "Always",
-                                    "env": [
-                                        *[
-                                            {"name": k, "value": v}
-                                            for k, v in get_current_settings()
-                                            .to_environment_variables(
-                                                exclude_unset=True
-                                            )
-                                            .items()
+                    },
+                    "spec": {
+                        "template": {
+                            "metadata": {
+                                "other_metadata": "other-metadata",
+                                "labels": {
+                                    "prefect.io/flow-run-id": str(flow_run.id),
+                                    "prefect.io/flow-run-name": flow_run.name,
+                                    "prefect.io/version": _slugify_label_value(
+                                        prefect.__version__.split("+")[0]
+                                    ),
+                                    "prefect.io/deployment-id": str(deployment.id),
+                                    "prefect.io/deployment-name": deployment.name,
+                                    "prefect.io/flow-id": str(flow.id),
+                                    "prefect.io/flow-name": flow.name,
+                                    "prefect.io/worker-name": worker_name,
+                                    "prefect.io/work-pool-name": work_pool.name,
+                                    "prefect.io/work-pool-id": str(work_pool.id),
+                                    "test_label": "test-label",
+                                    "label_from_template": "label-from-template",
+                                },
+                            },
+                            "spec": {
+                                "parallelism": 1,
+                                "completions": 1,
+                                "restartPolicy": "Never",
+                                "containers": [
+                                    {
+                                        "name": "prefect-job",
+                                        "imagePullPolicy": "Always",
+                                        "env": [
+                                            *[
+                                                {"name": k, "value": v}
+                                                for k, v in get_current_settings()
+                                                .to_environment_variables(
+                                                    exclude_unset=True
+                                                )
+                                                .items()
+                                            ],
+                                            {
+                                                "name": "PREFECT__FLOW_RUN_ID",
+                                                "value": str(flow_run.id),
+                                            },
+                                            {
+                                                "name": "TEST_ENV",
+                                                "value": "test",
+                                            },
                                         ],
-                                        {
-                                            "name": "PREFECT__FLOW_RUN_ID",
-                                            "value": str(flow_run.id),
-                                        },
-                                        {
-                                            "name": "TEST_ENV",
-                                            "value": "test",
-                                        },
-                                    ],
-                                    "image": "test-image:latest",
-                                    "args": ["echo", "hello"],
-                                    "resources": {
-                                        "limits": {
-                                            "memory": "200Mi",
-                                        },
-                                        "requests": {
-                                            "memory": "100Mi",
+                                        "image": "test-image:latest",
+                                        "args": ["echo", "hello"],
+                                        "resources": {
+                                            "limits": {
+                                                "memory": "200Mi",
+                                            },
+                                            "requests": {
+                                                "memory": "100Mi",
+                                            },
                                         },
-                                    },
-                                }
-                            ],
-                        },
-                    }
+                                    }
+                                ],
+                            },
+                        }
+                    },
                 },
-            },
-            cluster_config=None,
-            job_watch_timeout_seconds=120,
-            pod_watch_timeout_seconds=90,
-            stream_output=True,
+                cluster_config=None,
+                job_watch_timeout_seconds=120,
+                pod_watch_timeout_seconds=90,
+                stream_output=True,
+            )
         ),
     ),
 ]
```
<a href='https://github.com/prefecthq/prefect/blob/a0ae3b08f4b4b4b5727d33aeb8beb7766f894b86/src/integrations/prefect-snowflake/tests/experimental/test_spcs_worker.py#L506'>src/integrations/prefect-snowflake/tests/experimental/test_spcs_worker.py~L506</a>
```diff
 
     for state in ["DONE", "FAILED", "SUSPENDED", "DELETED", "INTERNAL_ERROR"]:
         exit_code_val = 0 if state == "DONE" else 1
-        mock_service.get_containers.side_effect = (
-            lambda s=state, ec=exit_code_val: iter([
-                create_mock_service_container(s, exit_code=ec)
-            ])
+        mock_service.get_containers.side_effect = lambda s=state, ec=exit_code_val: (
+            iter([create_mock_service_container(s, exit_code=ec)])
         )
 
         async with SPCSWorker(work_pool_name="test-pool") as worker:
```
<a href='https://github.com/prefecthq/prefect/blob/a0ae3b08f4b4b4b5727d33aeb8beb7766f894b86/src/prefect/server/events/filters.py#L163'>src/prefect/server/events/filters.py~L163</a>
```diff
 
 class EventOccurredFilter(EventDataFilter):
     since: DateTime = Field(
-        default_factory=lambda: prefect.types._datetime.start_of_day(
-            prefect.types._datetime.now("UTC")
-        )
-        - timedelta(days=180),
+        default_factory=lambda: (
+            prefect.types._datetime.start_of_day(prefect.types._datetime.now("UTC"))
+            - timedelta(days=180)
+        ),
         description="Only include events after this time (inclusive)",
     )
     until: DateTime = Field(
```

</p>
</details>
<details><summary><a href="https://github.com/qdrant/qdrant-client">qdrant/qdrant-client</a> (+14 -12 lines across 2 files)</summary>
<p>
<pre>ruff format --preview</pre>
</p>
<p>

<a href='https://github.com/qdrant/qdrant-client/blob/750d735b2917a30b0cbf468ddccbc47d12704e32/tests/congruence_tests/test_common.py#L336'>tests/congruence_tests/test_common.py~L336</a>
```diff
 
     if isinstance(res1, list):
         if is_context_search is True:
-            sorted_1 = sorted(res1, key=lambda x: (x.id))
-            sorted_2 = sorted(res2, key=lambda x: (x.id))
+            sorted_1 = sorted(res1, key=lambda x: x.id)
+            sorted_2 = sorted(res2, key=lambda x: x.id)
             compare_records(sorted_1, sorted_2, abs_tol=1e-5)
         else:
             compare_records(res1, res2)
```
<a href='https://github.com/qdrant/qdrant-client/blob/750d735b2917a30b0cbf468ddccbc47d12704e32/tests/congruence_tests/test_common.py#L345'>tests/congruence_tests/test_common.py~L345</a>
```diff
         res2, models.QueryResponse
     ):
         if is_context_search is True:
-            sorted_1 = sorted(res1.points, key=lambda x: (x.id))
-            sorted_2 = sorted(res2.points, key=lambda x: (x.id))
+            sorted_1 = sorted(res1.points, key=lambda x: x.id)
+            sorted_2 = sorted(res2.points, key=lambda x: x.id)
             compare_records(sorted_1, sorted_2, abs_tol=1e-5)
         else:
             compare_records(res1.points, res2.points)
```
<a href='https://github.com/qdrant/qdrant-client/blob/750d735b2917a30b0cbf468ddccbc47d12704e32/tests/congruence_tests/test_delete_points.py#L70'>tests/congruence_tests/test_delete_points.py~L70</a>
```diff
     compare_client_results(
         local_client,
         remote_client,
-        lambda c: c.query_points(
-            COLLECTION_NAME,
-            query=vector,
-            using="sparse-image",
-        ).points,
+        lambda c: (
+            c.query_points(
+                COLLECTION_NAME,
+                query=vector,
+                using="sparse-image",
+            ).points
+        ),
     )
 
     found_ids = [
```
<a href='https://github.com/qdrant/qdrant-client/blob/750d735b2917a30b0cbf468ddccbc47d12704e32/tests/congruence_tests/test_delete_points.py#L92'>tests/congruence_tests/test_delete_points.py~L92</a>
```diff
     compare_client_results(
         local_client,
         remote_client,
-        lambda c: c.query_points(
-            COLLECTION_NAME, query=vector, using="sparse-image"
-        ).points,
+        lambda c: (
+            c.query_points(COLLECTION_NAME, query=vector, using="sparse-image").points
+        ),
     )
```

</p>
</details>
<details><summary><a href="https://github.com/rotki/rotki">rotki/rotki</a> (+47 -50 lines across 9 files)</summary>
<p>
<pre>ruff format --preview</pre>
</p>
<p>

<a href='https://github.com/rotki/rotki/blob/e7c9932081ef145d4d627bffc75cb9525345ca43/rotkehlchen/api/rest.py#L6280'>rotkehlchen/api/rest.py~L6280</a>
```diff
                 to_timestamp=to_timestamp,
                 address=address,
                 blockchain=chain,
-                get_count_fn=lambda from_ts,
-                to_ts,
-                _chain_id=chain_id: db_evmtx.count_transactions_in_range(  # type: ignore[misc]  # noqa: E501
-                    chain_id=_chain_id,
-                    from_ts=from_ts,
-                    to_ts=to_ts,
+                get_count_fn=lambda from_ts, to_ts, _chain_id=chain_id: (
+                    db_evmtx.count_transactions_in_range(  # type: ignore[misc]  # noqa: E501
+                        chain_id=_chain_id,
+                        from_ts=from_ts,
+                        to_ts=to_ts,
+                    )
                 ),
                 query_for_range_fn=chain_manager.transactions.refetch_transactions_for_address,
             )
```
<a href='https://github.com/rotki/rotki/blob/e7c9932081ef145d4d627bffc75cb9525345ca43/rotkehlchen/chain/evm/decoding/aave/v3/decoder.py#L460'>rotkehlchen/chain/evm/decoding/aave/v3/decoder.py~L460</a>
```diff
                 ordered_events=ordered_events,
                 interest_event_lookup=interest_event_lookup,
                 used_interest_event_ids=used_interest_event_ids,
-                match_fn=lambda primary,
-                secondary: (  # use symbols due to Monerium and its different versions  # noqa: E501
+                match_fn=lambda primary, secondary: (  # use symbols due to Monerium and its different versions  # noqa: E501
                     (
                         underlying_token := get_single_underlying_token(
                             primary.asset.resolve_to_evm_token()
```
<a href='https://github.com/rotki/rotki/blob/e7c9932081ef145d4d627bffc75cb9525345ca43/rotkehlchen/chain/evm/decoding/balancer/decoder.py#L51'>rotkehlchen/chain/evm/decoding/balancer/decoder.py~L51</a>
```diff
             self,
             evm_inquirer=evm_inquirer,
             cache_type_to_check_for_freshness=BALANCER_CACHE_TYPE_MAPPING[counterparty],
-            query_data_method=lambda inquirer,
-            cache_type,
-            msg_aggregator,
-            reload_all: query_balancer_data(  # noqa: E501
-                inquirer=inquirer,
-                cache_type=cache_type,
-                protocol=counterparty,
-                msg_aggregator=msg_aggregator,
-                version=BALANCER_VERSION_MAPPING[counterparty],
-                reload_all=reload_all,
+            query_data_method=lambda inquirer, cache_type, msg_aggregator, reload_all: (
+                query_balancer_data(  # noqa: E501
+                    inquirer=inquirer,
+                    cache_type=cache_type,
+                    protocol=counterparty,
+                    msg_aggregator=msg_aggregator,
+                    version=BALANCER_VERSION_MAPPING[counterparty],
+                    reload_all=reload_all,
+                )
             ),
             read_data_from_cache_method=read_fn,
             chain_id=evm_inquirer.chain_id,
```
<a href='https://github.com/rotki/rotki/blob/e7c9932081ef145d4d627bffc75cb9525345ca43/rotkehlchen/chain/solana/node_inquirer.py#L354'>rotkehlchen/chain/solana/node_inquirer.py~L354</a>
```diff
         signatures = []
         while True:
             response: GetSignaturesForAddressResp = self.query(
-                method=lambda client,
-                _before=before,
-                _until=until: client.get_signatures_for_address(  # type: ignore[misc]  # noqa: E501
-                    account=Pubkey.from_string(address),
-                    limit=SIGNATURES_PAGE_SIZE,
-                    before=_before,
-                    until=_until,
+                method=lambda client, _before=before, _until=until: (
+                    client.get_signatures_for_address(  # type: ignore[misc]  # noqa: E501
+                        account=Pubkey.from_string(address),
+                        limit=SIGNATURES_PAGE_SIZE,
+                        before=_before,
+                        until=_until,
+                    )
                 ),
                 only_archive_nodes=True,
             )
```
<a href='https://github.com/rotki/rotki/blob/e7c9932081ef145d4d627bffc75cb9525345ca43/rotkehlchen/data_import/importers/binance.py#L331'>rotkehlchen/data_import/importers/binance.py~L331</a>
```diff
 
         for rows_group in rows_grouped_by_fee.values():
             rows_group.sort(
-                key=lambda x: x["Change"]
-                if same_assets
-                else x["Change"] * price_at_timestamp[x["Coin"]],
+                key=lambda x: (
+                    x["Change"] if same_assets else x["Change"] * price_at_timestamp[x["Coin"]]
+                ),
                 reverse=True,
             )  # noqa: E501
 
```
<a href='https://github.com/rotki/rotki/blob/e7c9932081ef145d4d627bffc75cb9525345ca43/rotkehlchen/globaldb/handler.py#L1184'>rotkehlchen/globaldb/handler.py~L1184</a>
```diff
                 entry.protocol,
             ),
             token_type="evm",
-            post_insert_callback=lambda: GlobalDBHandler._add_underlying_tokens(
-                write_cursor=write_cursor,
-                parent_token_identifier=entry.identifier,
-                underlying_tokens=entry.underlying_tokens,
-                chain_id=entry.chain_id,
-            )
-            if entry.underlying_tokens is not None
-            else None,
+            post_insert_callback=lambda: (
+                GlobalDBHandler._add_underlying_tokens(
+                    write_cursor=write_cursor,
+                    parent_token_identifier=entry.identifier,
+                    underlying_tokens=entry.underlying_tokens,
+                    chain_id=entry.chain_id,
+                )
+                if entry.underlying_tokens is not None
+                else None
+            ),
         )
 
     @staticmethod
```
<a href='https://github.com/rotki/rotki/blob/e7c9932081ef145d4d627bffc75cb9525345ca43/rotkehlchen/rotkehlchen.py#L631'>rotkehlchen/rotkehlchen.py~L631</a>
```diff
                         ]
                     },  # noqa: E501
                 ),
-                extra_check_callback=lambda: cursor.execute(
-                    "SELECT COUNT(*) FROM user_added_solana_tokens"
-                ).fetchone()[0]
-                > 0,  # noqa: E501
+                extra_check_callback=lambda: (
+                    cursor.execute("SELECT COUNT(*) FROM user_added_solana_tokens").fetchone()[0]
+                    > 0
+                ),  # noqa: E501
             )
 
     def _logout(self) -> None:
```
<a href='https://github.com/rotki/rotki/blob/e7c9932081ef145d4d627bffc75cb9525345ca43/rotkehlchen/tests/exchanges/test_cryptocom.py#L252'>rotkehlchen/tests/exchanges/test_cryptocom.py~L252</a>
```diff
         ),
         patch(
             target="rotkehlchen.inquirer.Inquirer.find_price",
-            side_effect=lambda from_asset, to_asset: (
-                FVal(112000) if from_asset == A_BTC else ONE
-            ),
+            side_effect=lambda from_asset, to_asset: FVal(112000) if from_asset == A_BTC else ONE,
         ),
     ):
         balances, msg = mock_cryptocom.query_balances()
```
<a href='https://github.com/rotki/rotki/blob/e7c9932081ef145d4d627bffc75cb9525345ca43/rotkehlchen/tests/unit/test_solana.py#L313'>rotkehlchen/tests/unit/test_solana.py~L313</a>
```diff
             patch.object(
                 target=solana_manager.node_inquirer,
                 attribute="query",
-                side_effect=lambda method,
-                call_order=None,
-                only_archive_nodes=False,
-                endpoint=expected_endpoint: original_query(  # noqa: E501
-                    method=partial(check_client, method=method, expected_endpoint=endpoint),
-                    call_order=call_order,
-                    only_archive_nodes=only_archive_nodes,
+                side_effect=lambda method, call_order=None, only_archive_nodes=False, endpoint=expected_endpoint: (
+                    original_query(  # noqa: E501
+                        method=partial(check_client, method=method, expected_endpoint=endpoint),
+                        call_order=call_order,
+                        only_archive_nodes=only_archive_nodes,
+                    )
                 ),
             ) as query_mock,
         ):
```

</p>
</details>
<details><summary><a href="https://github.com/zulip/zulip">zulip/zulip</a> (+49 -29 lines across 2 files)</summary>
<p>
<pre>ruff format --preview</pre>
</p>
<p>

<a href='https://github.com/zulip/zulip/blob/86cec937dd0ab004c9f2f50d1a853dd432e2c996/zerver/lib/user_groups.py#L788'>zerver/lib/user_groups.py~L788</a>
```diff
 
 def get_recursive_subgroups_union_for_groups(user_group_ids: list[int]) -> QuerySet[UserGroup]:
     cte = CTE.recursive(
-        lambda cte: UserGroup.objects.filter(id__in=user_group_ids)
-        .values(group_id=F("id"))
-        .union(
-            cte.join(NamedUserGroup, direct_supergroups=cte.col.group_id).values(group_id=F("id"))
+        lambda cte: (
+            UserGroup.objects.filter(id__in=user_group_ids)
+            .values(group_id=F("id"))
+            .union(
+                cte.join(NamedUserGroup, direct_supergroups=cte.col.group_id).values(
+                    group_id=F("id")
+                )
+            )
         )
     )
     return with_cte(cte, select=cte.join(UserGroup, id=cte.col.group_id))
```
<a href='https://github.com/zulip/zulip/blob/86cec937dd0ab004c9f2f50d1a853dd432e2c996/zerver/lib/user_groups.py#L799'>zerver/lib/user_groups.py~L799</a>
```diff
 
 def get_recursive_supergroups_union_for_groups(user_group_ids: list[int]) -> QuerySet[UserGroup]:
     cte = CTE.recursive(
-        lambda cte: UserGroup.objects.filter(id__in=user_group_ids)
-        .values(group_id=F("id"))
-        .union(cte.join(UserGroup, direct_subgroups=cte.col.group_id).values(group_id=F("id")))
+        lambda cte: (
+            UserGroup.objects.filter(id__in=user_group_ids)
+            .values(group_id=F("id"))
+            .union(cte.join(UserGroup, direct_subgroups=cte.col.group_id).values(group_id=F("id")))
+        )
     )
     return with_cte(cte, select=cte.join(UserGroup, id=cte.col.group_id))
 
```
<a href='https://github.com/zulip/zulip/blob/86cec937dd0ab004c9f2f50d1a853dd432e2c996/zerver/lib/user_groups.py#L815'>zerver/lib/user_groups.py~L815</a>
```diff
     # user_group passed.
     direct_subgroup_ids = user_group.direct_subgroups.all().values("id")
     cte = CTE.recursive(
-        lambda cte: NamedUserGroup.objects.filter(id__in=direct_subgroup_ids)
-        .values(group_id=F("id"))
-        .union(
-            cte.join(NamedUserGroup, direct_supergroups=cte.col.group_id).values(group_id=F("id"))
+        lambda cte: (
+            NamedUserGroup.objects.filter(id__in=direct_subgroup_ids)
+            .values(group_id=F("id"))
+            .union(
+                cte.join(NamedUserGroup, direct_supergroups=cte.col.group_id).values(
+                    group_id=F("id")
+                )
+            )
         )
     )
     return with_cte(cte, select=cte.join(NamedUserGroup, id=cte.col.group_id))
```
<a href='https://github.com/zulip/zulip/blob/86cec937dd0ab004c9f2f50d1a853dd432e2c996/zerver/lib/user_groups.py#L907'>zerver/lib/user_groups.py~L907</a>
```diff
     user_group_ids: Iterable[int], realm: Realm
 ) -> QuerySet[NamedUserGroup]:
     cte = CTE.recursive(
-        lambda cte: NamedUserGroup.objects.filter(id__in=user_group_ids, realm_for_sharding=realm)
-        .values(group_id=F("id"))
-        .union(
-            cte.join(NamedUserGroup, direct_supergroups=cte.col.group_id).values(group_id=F("id"))
+        lambda cte: (
+            NamedUserGroup.objects.filter(id__in=user_group_ids, realm_for_sharding=realm)
+            .values(group_id=F("id"))
+            .union(
+                cte.join(NamedUserGroup, direct_supergroups=cte.col.group_id).values(
+                    group_id=F("id")
+                )
+            )
         )
     )
     recursive_subgroups = with_cte(cte, select=cte.join(NamedUserGroup, id=cte.col.group_id))
```
<a href='https://github.com/zulip/zulip/blob/86cec937dd0ab004c9f2f50d1a853dd432e2c996/zerver/lib/user_groups.py#L924'>zerver/lib/user_groups.py~L924</a>
```diff
     # each group root_id and annotates it with that group.
 
     cte = CTE.recursive(
-        lambda cte: UserGroup.objects.filter(id__in=user_group_ids, realm=realm_id)
-        .values(group_id=F("id"), root_id=F("id"))
-        .union(
-            cte.join(NamedUserGroup, direct_supergroups=cte.col.group_id).values(
-                group_id=F("id"), root_id=cte.col.root_id
+        lambda cte: (
+            UserGroup.objects.filter(id__in=user_group_ids, realm=realm_id)
+            .values(group_id=F("id"), root_id=F("id"))
+            .union(
+                cte.join(NamedUserGroup, direct_supergroups=cte.col.group_id).values(
+                    group_id=F("id"), root_id=cte.col.root_id
+                )
             )
         )
     )
```
<a href='https://github.com/zulip/zulip/blob/86cec937dd0ab004c9f2f50d1a853dd432e2c996/zerver/webhooks/github/view.py#L334'>zerver/webhooks/github/view.py~L334</a>
```diff
             "author": lambda: self.payload["discussion"]["user"]["login"].tame(check_string),
             "url": lambda: self.payload["discussion"]["html_url"].tame(check_string),
             "action": lambda: self.payload["action"].tame(check_string),
-            "configured_title": lambda: f" {self.template_values['title']()}"
-            if self.include_title
-            else "",
+            "configured_title": lambda: (
+                f" {self.template_values['title']()}" if self.include_title else ""
+            ),
             "category": lambda: self.payload["discussion"]["category"]["name"].tame(check_string),
             "title": lambda: self.payload["discussion"]["title"].tame(check_string),
             "body": lambda: self.payload["discussion"]["body"].tame(check_string),
```
<a href='https://github.com/zulip/zulip/blob/86cec937dd0ab004c9f2f50d1a853dd432e2c996/zerver/webhooks/github/view.py#L355'>zerver/webhooks/github/view.py~L355</a>
```diff
             # locked_reason includes the " as " as prefix,
             # because locked_reason could be null too, in which case,
             # we drop this entire part from the message.
-            "locked_reason": lambda: f" as {self.payload['discussion']['active_lock_reason'].tame(check_string)}"
-            if self.payload["discussion"]["active_lock_reason"]
-            else "",
+            "locked_reason": lambda: (
+                f" as {self.payload['discussion']['active_lock_reason'].tame(check_string)}"
+                if self.payload["discussion"]["active_lock_reason"]
+                else ""
+            ),
             "closed_reason": lambda: self.payload["discussion"]["state_reason"].tame(check_string),
             # answer_field is used to determine which payload field to use.
             # It is either "answer" (for answered action)
             # or "old_answer" (for unanswered action)
-            "answer_field": lambda: "old_answer"
-            if self.payload["action"].tame(check_string) == "unanswered"
-            else "answer",
+            "answer_field": lambda: (
+                "old_answer"
+                if self.payload["action"].tame(check_string) == "unanswered"
+                else "answer"
+            ),
             "answer_url": lambda: self.payload[self.template_values["answer_field"]()][
                 "html_url"
             ].tame(check_string),
```

</p>
</details>
<details><summary><a href="https://github.com/indico/indico">indico/indico</a> (+9 -8 lines across 6 files)</summary>
<p>
<pre>ruff format --preview</pre>
</p>
<p>

<a href='https://github.com/indico/indico/blob/4035d8057058abf74b063bef3fbe9aa1ac41db56/indico/modules/events/forms.py#L117'>indico/modules/events/forms.py~L117</a>
```diff
     )
     category = CategoryField(
         _('Category'),
-        [UsedIf(lambda form, _: (form.listing.data or not can_create_unlisted_events(session.user))), DataRequired()],
+        [UsedIf(lambda form, _: form.listing.data or not can_create_unlisted_events(session.user)), DataRequired()],
         require_event_creation_rights=True,
         show_event_creation_warning=True,
     )
```
<a href='https://github.com/indico/indico/blob/4035d8057058abf74b063bef3fbe9aa1ac41db56/indico/modules/events/layout/forms.py#L134'>indico/modules/events/layout/forms.py~L134</a>
```diff
     theme = SelectField(
         _('Theme'),
         [Optional(), HiddenUnless('use_custom_css', False)],
-        coerce=lambda x: (x or None),
+        coerce=lambda x: x or None,
         description=_(
             'Currently selected theme of the conference page. Click on the Preview button to '
             'preview and select a different one.'
```
<a href='https://github.com/indico/indico/blob/4035d8057058abf74b063bef3fbe9aa1ac41db56/indico/modules/events/layout/forms.py#L274'>indico/modules/events/layout/forms.py~L274</a>
```diff
 
 
 class CSSSelectionForm(IndicoForm):
-    theme = SelectField(_('Theme'), [Optional()], coerce=lambda x: (x or None))
+    theme = SelectField(_('Theme'), [Optional()], coerce=lambda x: x or None)
 
     def __init__(self, *args, **kwargs):
         event = kwargs.pop('event')
```
<a href='https://github.com/indico/indico/blob/4035d8057058abf74b063bef3fbe9aa1ac41db56/indico/modules/events/management/forms.py#L69'>indico/modules/events/management/forms.py~L69</a>
```diff
 class EventDataForm(IndicoForm):
     title = StringField(_('Event title'), [DataRequired()])
     description = TextAreaField(_('Description'), widget=TinyMCEWidget(images=True, height=350))
-    url_shortcut = StringField(_('URL shortcut'), filters=[lambda x: (x or None)])
+    url_shortcut = StringField(_('URL shortcut'), filters=[lambda x: x or None])
 
     def __init__(self, *args, event, **kwargs):
         self.event = event
```
<a href='https://github.com/indico/indico/blob/4035d8057058abf74b063bef3fbe9aa1ac41db56/indico/modules/events/papers/schemas.py#L251'>indico/modules/events/papers/schemas.py~L251</a>
```diff
         lambda paper, ctx: editable_type_settings[EditableType.paper].get(paper.event, 'submission_enabled')
     )
     editing_enabled = Function(
-        lambda paper, ctx: paper.event.has_feature('editing')
-        and 'paper' in editing_settings.get(paper.event, 'editable_types')
+        lambda paper, ctx: (
+            paper.event.has_feature('editing') and 'paper' in editing_settings.get(paper.event, 'editable_types')
+        )
     )
 
 
```
<a href='https://github.com/indico/indico/blob/4035d8057058abf74b063bef3fbe9aa1ac41db56/indico/modules/events/registration/forms.py#L165'>indico/modules/events/registration/forms.py~L165</a>
```diff
     )
     currency = SelectField(_('Currency'), [DataRequired()], description=_('The currency for new registrations'))
     notification_sender_address = StringField(
-        _('Notification sender address'), [IndicoEmail()], filters=[lambda x: (x or None)]
+        _('Notification sender address'), [IndicoEmail()], filters=[lambda x: x or None]
     )
     message_pending = TextAreaField(_('Message for pending registrations'))
     message_unpaid = TextAreaField(_('Message for unpaid registrations'))
```
<a href='https://github.com/indico/indico/blob/4035d8057058abf74b063bef3fbe9aa1ac41db56/indico/web/flask/templating_test.py#L133'>indico/web/flask/templating_test.py~L133</a>
```diff
 
 def test_template_hooks_markup():
     def _make_tpl_hook(name=''):
-        return lambda: (f'&test{name}@{current_plugin.name}' if current_plugin else f'&test{name}')
+        return lambda: f'&test{name}@{current_plugin.name}' if current_plugin else f'&test{name}'
 
     with (
         _register_template_hook_cleanup('test-hook', _make_tpl_hook(1)),
```

</p>
</details>
<details><summary><a href="https://github.com/zanieb/huggingface-notebooks">zanieb/huggingface-notebooks</a> (+1 -1 lines across 1 file)</summary>
<p>
<pre>ruff format --preview</pre>
</p>
<p>

<a href='https://github.com/zanieb/huggingface-notebooks/blob/68cd6fa1a2831c5189f85257c13d691cb76292db/course/fr/chapter5/section6_tf.ipynb#L58'>course/fr/chapter5/section6_tf.ipynb~L58</a>
```diff
    "outputs": [],
    "source": [
     "issues_dataset = issues_dataset.filter(\n",
-    "    lambda x: (x[\"is_pull_request\"] == False and len(x[\"comments\"]) > 0)\n",
+    "    lambda x: x[\"is_pull_request\"] == False and len(x[\"comments\"]) > 0\n",
     ")\n",
     "issues_dataset"
    ]
```

</p>
</details>
<details><summary><a href="https://github.com/openai/openai-cookbook">openai/openai-cookbook</a> (+14 -8 lines across 4 files)</summary>
<p>
<pre>ruff format --preview --exclude examples/mcp/databricks_mcp_cookbook.ipynb,examples/chatgpt/gpt_actions_library/gpt_action_google_drive.ipynb,examples/chatgpt/gpt_actions_library/gpt_action_redshift.ipynb,examples/chatgpt/gpt_actions_library/gpt_action_salesforce.ipynb,</pre>
</p>
<p>

<a href='https://github.com/openai/openai-cookbook/blob/1f6e8eb411ee08a6050b264f73c4b9fda00cb1b8/examples/Search_reranking_with_cross-encoders.ipynb#L538'>examples/Search_reranking_with_cross-encoders.ipynb~L538</a>
```diff
     "output_df[\"probability\"] = output_df[\"logprobs\"].apply(exp)\n",
     "# Reorder based on likelihood of being Yes\n",
     "output_df[\"yes_probability\"] = output_df.apply(\n",
-    "    lambda x: x[\"probability\"] * -1 + 1\n",
-    "    if x[\"prediction\"] == \"No\"\n",
-    "    else x[\"probability\"],\n",
+    "    lambda x: (\n",
+    "        x[\"probability\"] * -1 + 1 if x[\"prediction\"] == \"No\" else x[\"probability\"]\n",
+    "    ),\n",
     "    axis=1,\n",
     ")\n",
     "output_df.head()"
```
<a href='https://github.com/openai/openai-cookbook/blob/1f6e8eb411ee08a6050b264f73c4b9fda00cb1b8/examples/completions_usage_api.ipynb#L1522'>examples/completions_usage_api.ipynb~L1522</a>
```diff
     "            plt.pie(\n",
     "                other_projects[\"num_model_requests\"],\n",
     "                labels=other_projects[\"project_id\"],\n",
-    "                autopct=lambda p: f\"{p:.1f}%\\n({int(p * other_total_requests / 100):,})\",\n",
+    "                autopct=lambda p: (\n",
+    "                    f\"{p:.1f}%\\n({int(p * other_total_requests / 100):,})\"\n",
+    "                ),\n",
     "                startangle=140,\n",
     "                textprops={\"fontsize\": 10},\n",
     "            )\n",
```
<a href='https://github.com/openai/openai-cookbook/blob/1f6e8eb411ee08a6050b264f73c4b9fda00cb1b8/examples/vector_databases/pinecone/Using_vision_modality_for_RAG_with_Pinecone.ipynb#L574'>examples/vector_databases/pinecone/Using_vision_modality_for_RAG_with_Pinecone.ipynb~L574</a>
```diff
    "source": [
     "# Add a column to flag pages with visual content\n",
     "df[\"Visual_Input_Processed\"] = df[\"PageText\"].apply(\n",
-    "    lambda x: \"Y\"\n",
-    "    if \"DESCRIPTION OF THE IMAGE OR CHART\" in x or \"TRANSCRIPTION OF THE TABLE\" in x\n",
-    "    else \"N\"\n",
+    "    lambda x: (\n",
+    "        \"Y\"\n",
+    "        if \"DESCRIPTION OF THE IMAGE OR CHART\" in x or \"TRANSCRIPTION OF THE TABLE\" in x\n",
+    "        else \"N\"\n",
+    "    )\n",
     ")\n",
     "\n",
     "\n",
```
<a href='https://github.com/openai/openai-cookbook/blob/1f6e8eb411ee08a6050b264f73c4b9fda00cb1b8/examples/vector_databases/redis/redis-hybrid-query-examples.ipynb#L356'>examples/vector_databases/redis/redis-hybrid-query-examples.ipynb~L356</a>
```diff
    ],
    "source": [
     "df[\"product_text\"] = df.apply(\n",
-    "    lambda row: f\"name {row['productDisplayName']} category {row['masterCategory']} subcategory {row['subCategory']} color {row['baseColour']} gender {row['gender']}\".lower(),\n",
+    "    lambda row: (\n",
+    "        f\"name {row['productDisplayName']} category {row['masterCategory']} subcategory {row['subCategory']} color {row['baseColour']} gender {row['gender']}\".lower()\n",
+    "    ),\n",
     "    axis=1,\n",
     ")\n",
     "df.rename({\"id\": \"product_id\"}, inplace=True, axis=1)\n",
```

</p>
</details>
<details><summary><a href="https://github.com/python-trio/trio">python-trio/trio</a> (+4 -2 lines across 1 file)</summary>
<p>
<pre>ruff format --preview</pre>
</p>
<p>

<a href='https://github.com/python-trio/trio/blob/5f9c6031ff223a182e93e2f866b4001b8ffad51c/src/trio/_core/_tests/test_run.py#L1379'>src/trio/_core/_tests/test_run.py~L1379</a>
```diff
         Matcher(
             ValueError,
             "^Unique Text$",
-            lambda e: isinstance(e.__context__, IndexError)
-            and isinstance(e.__context__.__context__, KeyError),
+            lambda e: (
+                isinstance(e.__context__, IndexError)
+                and isinstance(e.__context__.__context__, KeyError)
+            ),
         ),
     ):
         async with _core.open_nursery() as nursery:
```

</p>
</details>
<details><summary><a href="https://github.com/astropy/astropy">astropy/astropy</a> (+4 -4 lines across 1 file)</summary>
<p>
<pre>ruff format --preview</pre>
</p>
<p>

<a href='https://github.com/astropy/astropy/blob/8407999759909e5e24cc45fa69bfc5c936564d75/astropy/io/fits/hdu/table.py#L532'>astropy/io/fits/hdu/table.py~L532</a>
```diff
                     )
                 )
 
-            self.req_cards("NAXIS", None, lambda v: (v == 2), 2, option, errs)
-            self.req_cards("BITPIX", None, lambda v: (v == 8), 8, option, errs)
+            self.req_cards("NAXIS", None, lambda v: v == 2, 2, option, errs)
+            self.req_cards("BITPIX", None, lambda v: v == 8, 8, option, errs)
             self.req_cards(
                 "TFIELDS",
                 7,
-                lambda v: (_is_int(v) and v >= 0 and v <= 999),
+                lambda v: _is_int(v) and v >= 0 and v <= 999,
                 0,
                 option,
                 errs,
```
<a href='https://github.com/astropy/astropy/blob/8407999759909e5e24cc45fa69bfc5c936564d75/astropy/io/fits/hdu/table.py#L787'>astropy/io/fits/hdu/table.py~L787</a>
```diff
         `TableHDU` verify method.
         """
         errs = super()._verify(option=option)
-        self.req_cards("PCOUNT", None, lambda v: (v == 0), 0, option, errs)
+        self.req_cards("PCOUNT", None, lambda v: v == 0, 0, option, errs)
         tfields = self._header["TFIELDS"]
         for idx in range(tfields):
             self.req_cards("TBCOL" + str(idx + 1), None, _is_int, None, option, errs)
```

</p>
</details>

