From e49033d930da515d189dea7ee01bdc8575f371e1 Mon Sep 17 00:00:00 2001 From: Danny Liu Date: Wed, 23 Oct 2024 04:09:19 -0700 Subject: [PATCH] PyDocStyle Check - PT005: Fixture returns a value, remove leading underscore (#43292) * style: remove underscore from function name * style: remove PT005 from ignore list --- providers/tests/ssh/operators/test_ssh.py | 2 +- pyproject.toml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/providers/tests/ssh/operators/test_ssh.py b/providers/tests/ssh/operators/test_ssh.py index 810f5363d1bf5..bedd6c5373b42 100644 --- a/providers/tests/ssh/operators/test_ssh.py +++ b/providers/tests/ssh/operators/test_ssh.py @@ -66,7 +66,7 @@ def setup_method(self): # Make sure nothing in this test actually connects to SSH -- that's for hook tests. @pytest.fixture(autouse=True) - def _patch_exec_ssh_client(self): + def patch_exec_ssh_client(self): with mock.patch.object(self.hook, "exec_ssh_client_command") as exec_ssh_client_command: self.exec_ssh_client_command = exec_ssh_client_command exec_ssh_client_command.return_value = (0, b"airflow", "") diff --git a/pyproject.toml b/pyproject.toml index 3eb574c92c216..b97d86540b8b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -295,7 +295,6 @@ ignore = [ "E731", # Do not assign a lambda expression, use a def "TCH003", # Do not move imports from stdlib to TYPE_CHECKING block "PT004", # Fixture does not return anything, add leading underscore - "PT005", # Fixture returns a value, remove leading underscore "PT006", # Wrong type of names in @pytest.mark.parametrize "PT007", # Wrong type of values in @pytest.mark.parametrize "PT013", # silly rule prohibiting e.g. `from pytest import param`