Skip to content

Commit

Permalink
Address ruff PTH101 exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
shatakshiiii committed May 22, 2024
1 parent de03aae commit fa502a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ ignore = [
'PT019', # Fixture `_mocked_func` without value is injected as parameter, use `@pytest.mark.usefixtures` instead
'PT022', # [*] No teardown in fixture `cmd_in_tty`, use `return` instead of `yield`
'PTH100', # `os.path.abspath()` should be replaced by `Path.resolve()`
'PTH101', # `os.chmod()` should be replaced by `Path.chmod()`
'PTH103', # `os.makedirs()` should be replaced by `Path.mkdir(parents=True)`
'PTH107', # `os.remove()` should be replaced by `Path.unlink()`
'PTH109', # `os.getcwd()` should be replaced by `Path.cwd()`
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ def locked_directory(tmpdir: str) -> Generator[str, None, None]:
:param tmpdir: Fixture for temporary directory
:yields: The temporary directory
"""
os.chmod(tmpdir, 0o000)
Path(tmpdir).chmod(0o000)
yield tmpdir
os.chmod(tmpdir, 0o777)
Path(tmpdir).chmod(0o777)


@pytest.fixture(scope="session")
Expand Down

0 comments on commit fa502a0

Please sign in to comment.