From 8033c82762441213e2b5bd6268b1d2f3b0d9f3f6 Mon Sep 17 00:00:00 2001 From: alexander-beedie Date: Sun, 3 Mar 2024 01:15:18 +0400 Subject: [PATCH] lint --- py-polars/tests/unit/utils/test_deprecation.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/py-polars/tests/unit/utils/test_deprecation.py b/py-polars/tests/unit/utils/test_deprecation.py index 639ff7615daf1..b5f6d75132b6a 100644 --- a/py-polars/tests/unit/utils/test_deprecation.py +++ b/py-polars/tests/unit/utils/test_deprecation.py @@ -21,7 +21,8 @@ def test_issue_deprecation_warning() -> None: def test_deprecate_function() -> None: @deprecate_function("This is deprecated.", version="1.0.0") - def hello() -> None: ... + def hello() -> None: + ... with pytest.deprecated_call(): hello() @@ -29,7 +30,8 @@ def hello() -> None: ... def test_deprecate_renamed_function() -> None: @deprecate_renamed_function("new_hello", version="1.0.0") - def hello() -> None: ... + def hello() -> None: + ... with pytest.deprecated_call(match="new_hello"): hello() @@ -38,7 +40,8 @@ def hello() -> None: ... def test_deprecate_renamed_parameter(recwarn: Any) -> None: @deprecate_renamed_parameter("foo", "oof", version="1.0.0") @deprecate_renamed_parameter("bar", "rab", version="2.0.0") - def hello(oof: str, rab: str, ham: str) -> None: ... + def hello(oof: str, rab: str, ham: str) -> None: + ... hello(foo="x", bar="y", ham="z") # type: ignore[call-arg] @@ -49,9 +52,8 @@ def hello(oof: str, rab: str, ham: str) -> None: ... class Foo: # noqa: D101 @deprecate_nonkeyword_arguments(allowed_args=["self", "baz"], version="0.1.2") - def bar( # noqa: D102 - self, baz: str, ham: str | None = None, foobar: str | None = None - ) -> None: ... + def bar(self, baz: str, ham: str | None = None, foobar: str | None = None) -> None: + ... def test_deprecate_nonkeyword_arguments_method_signature() -> None: