Skip to content

Commit 9a24747

Browse files
Pierre-SassoulasDanielNoord
authored andcommitted
Extend duplicate-code disable to cover tempdir helper
Move the ``# pylint: enable=duplicate-code`` comment after the ``tempdir`` context manager so it is covered by the existing suppression scope.
1 parent 236eb8a commit 9a24747

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/config/test_find_default_config_files.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ def fake_home() -> Iterator[None]:
6060
shutil.rmtree(folder, ignore_errors=True)
6161

6262

63-
# pylint: enable=duplicate-code
64-
65-
6663
@contextlib.contextmanager
6764
def tempdir() -> Iterator[str]:
6865
"""Create a temp directory and change the current location to it.
@@ -83,6 +80,9 @@ def tempdir() -> Iterator[str]:
8380
shutil.rmtree(abs_tmp)
8481

8582

83+
# pylint: enable=duplicate-code
84+
85+
8686
@pytest.mark.usefixtures("pop_pylintrc")
8787
def test_pylintrc() -> None:
8888
"""Test that the environment variable is checked for existence."""

0 commit comments

Comments
 (0)