diff --git a/pyproject.toml b/pyproject.toml index 38aec913..e862bf08 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -177,7 +177,7 @@ select = [ "T201", "T203", # misuse of typing.TYPE_CHECKING - "TCH004", + "TC004", # import rules "TID251", ] diff --git a/requirements-dev.lock b/requirements-dev.lock index 172ccf7f..15a2fc37 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -78,7 +78,7 @@ pytz==2023.3.post1 # via dirty-equals respx==0.22.0 rich==13.7.1 -ruff==0.6.9 +ruff==0.9.4 setuptools==68.2.2 # via nodeenv six==1.16.0 diff --git a/scripts/utils/ruffen-docs.py b/scripts/utils/ruffen-docs.py index 37b3d94f..0cf2bd2f 100644 --- a/scripts/utils/ruffen-docs.py +++ b/scripts/utils/ruffen-docs.py @@ -47,7 +47,7 @@ def _md_match(match: Match[str]) -> str: with _collect_error(match): code = format_code_block(code) code = textwrap.indent(code, match["indent"]) - return f'{match["before"]}{code}{match["after"]}' + return f"{match['before']}{code}{match['after']}" def _pycon_match(match: Match[str]) -> str: code = "" @@ -97,7 +97,7 @@ def finish_fragment() -> None: def _md_pycon_match(match: Match[str]) -> str: code = _pycon_match(match) code = textwrap.indent(code, match["indent"]) - return f'{match["before"]}{code}{match["after"]}' + return f"{match['before']}{code}{match['after']}" src = MD_RE.sub(_md_match, src) src = MD_PYCON_RE.sub(_md_pycon_match, src) diff --git a/src/orb/_models.py b/src/orb/_models.py index 9a918aab..12c34b7d 100644 --- a/src/orb/_models.py +++ b/src/orb/_models.py @@ -172,7 +172,7 @@ def to_json( @override def __str__(self) -> str: # mypy complains about an invalid self arg - return f'{self.__repr_name__()}({self.__repr_str__(", ")})' # type: ignore[misc] + return f"{self.__repr_name__()}({self.__repr_str__(', ')})" # type: ignore[misc] # Override the 'construct' method in a way that supports recursive parsing without validation. # Based on https://github.com/samuelcolvin/pydantic/issues/1168#issuecomment-817742836. diff --git a/tests/api_resources/dimensional_price_groups/test_external_dimensional_price_group_id.py b/tests/api_resources/dimensional_price_groups/test_external_dimensional_price_group_id.py index d4fd8c5a..e4d7118f 100644 --- a/tests/api_resources/dimensional_price_groups/test_external_dimensional_price_group_id.py +++ b/tests/api_resources/dimensional_price_groups/test_external_dimensional_price_group_id.py @@ -87,8 +87,10 @@ async def test_raw_response_retrieve(self, async_client: AsyncOrb) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncOrb) -> None: - async with async_client.dimensional_price_groups.external_dimensional_price_group_id.with_streaming_response.retrieve( - "external_dimensional_price_group_id", + async with ( + async_client.dimensional_price_groups.external_dimensional_price_group_id.with_streaming_response.retrieve( + "external_dimensional_price_group_id", + ) ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_customers.py b/tests/api_resources/test_customers.py index abedef0b..ff9b5b33 100644 --- a/tests/api_resources/test_customers.py +++ b/tests/api_resources/test_customers.py @@ -917,8 +917,10 @@ async def test_raw_response_sync_payment_methods_from_gateway_by_external_custom async def test_streaming_response_sync_payment_methods_from_gateway_by_external_customer_id( self, async_client: AsyncOrb ) -> None: - async with async_client.customers.with_streaming_response.sync_payment_methods_from_gateway_by_external_customer_id( - "customer_id", + async with ( + async_client.customers.with_streaming_response.sync_payment_methods_from_gateway_by_external_customer_id( + "customer_id", + ) ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python"