Skip to content

Commit

Permalink
Address ruff PTH115 exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
shatakshiiii committed May 22, 2024
1 parent 374cb2a commit 2ce37f5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ ignore = [
'PTH111', # `os.path.expanduser()` should be replaced by `Path.expanduser()`
'PTH113', # `os.path.isfile()` should be replaced by `Path.is_file()`
'PTH114', # `os.path.islink()` should be replaced by `Path.is_symlink()`
'PTH115', # `os.readlink()` should be replaced by `Path.readlink()`
'PTH116', # `os.stat()` should be replaced by `Path.stat()`, `Path.owner()`, or `Path.group()`
'PTH118', # `os.path.join()` should be replaced by `Path` with `/` operator
'PTH119', # `os.path.basename()` should be replaced by `Path.name`
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def copytree(
destination_path = os.path.join(dst, name)
try:
if symlinks and os.path.islink(source_path):
source_link = os.readlink(source_path)
source_link = Path(source_path).readlink()
os.symlink(source_link, destination_path)
elif Path(source_path).is_dir():
copytree(
Expand Down

0 comments on commit 2ce37f5

Please sign in to comment.