Skip to content

CQ: Fix Ruff PTH113: os.path.isfile() should be replaced by Path.is_file() - #577

Closed
echoix wants to merge 7 commits into
mainfrom
ruff-PTH113-os-path-isfile-and-others
Closed

echoix wants to merge 7 commits into
mainfrom
ruff-PTH113-os-path-isfile-and-others

Conversation

@echoix

@echoix echoix commented Nov 2, 2025

Copy link
Copy Markdown
Owner

@echoix
echoix force-pushed the ruff-PTH113-os-path-isfile-and-others branch from 25ca387 to 87dc9a7 Compare November 2, 2025 20:48
Repository owner deleted a comment from github-actions Bot Nov 6, 2025
Repository owner deleted a comment from github-actions Bot Nov 6, 2025
Repository owner deleted a comment from github-actions Bot Nov 6, 2025
Repository owner deleted a comment from github-actions Bot Nov 6, 2025
Repository owner deleted a comment from github-actions Bot Nov 6, 2025
Repository owner deleted a comment from github-actions Bot Nov 6, 2025
Comment on lines 83 to 85
self.assertTrue(
os.path.isdir(os.path.join(self.tmp_mapset_path, "signatures", "sig"))
Path(self.tmp_mapset_path, "signatures", "sig").is_dir()
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ruff] reported by reviewdog 🐶

Suggested change
self.assertTrue(
os.path.isdir(os.path.join(self.tmp_mapset_path, "signatures", "sig"))
Path(self.tmp_mapset_path, "signatures", "sig").is_dir()
)
self.assertTrue(Path(self.tmp_mapset_path, "signatures", "sig").is_dir())

Comment on lines 88 to 90
self.assertTrue(
os.path.isdir(os.path.join(self.tmp_mapset_path, "signatures", "sig"))
Path(self.tmp_mapset_path, "signatures", "sig").is_dir()
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ruff] reported by reviewdog 🐶

Suggested change
self.assertTrue(
os.path.isdir(os.path.join(self.tmp_mapset_path, "signatures", "sig"))
Path(self.tmp_mapset_path, "signatures", "sig").is_dir()
)
self.assertTrue(Path(self.tmp_mapset_path, "signatures", "sig").is_dir())

Comment on lines 94 to 96
self.assertTrue(
os.path.isdir(os.path.join(self.tmp_mapset_path, "signatures", "sigset"))
Path(self.tmp_mapset_path, "signatures", "sigset").is_dir()
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ruff] reported by reviewdog 🐶

Suggested change
self.assertTrue(
os.path.isdir(os.path.join(self.tmp_mapset_path, "signatures", "sigset"))
Path(self.tmp_mapset_path, "signatures", "sigset").is_dir()
)
self.assertTrue(Path(self.tmp_mapset_path, "signatures", "sigset").is_dir())

Comment on lines 99 to 101
self.assertTrue(
os.path.isdir(os.path.join(self.tmp_mapset_path, "signatures", "sigset"))
Path(self.tmp_mapset_path, "signatures", "sigset").is_dir()
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ruff] reported by reviewdog 🐶

Suggested change
self.assertTrue(
os.path.isdir(os.path.join(self.tmp_mapset_path, "signatures", "sigset"))
Path(self.tmp_mapset_path, "signatures", "sigset").is_dir()
)
self.assertTrue(Path(self.tmp_mapset_path, "signatures", "sigset").is_dir())

Comment on lines 105 to 107
self.assertTrue(
os.path.isdir(os.path.join(self.tmp_mapset_path, "signatures", "libsvm"))
Path(self.tmp_mapset_path, "signatures", "libsvm").is_dir()
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ruff] reported by reviewdog 🐶

Suggested change
self.assertTrue(
os.path.isdir(os.path.join(self.tmp_mapset_path, "signatures", "libsvm"))
Path(self.tmp_mapset_path, "signatures", "libsvm").is_dir()
)
self.assertTrue(Path(self.tmp_mapset_path, "signatures", "libsvm").is_dir())

Comment on lines 110 to 112
self.assertTrue(
os.path.isdir(os.path.join(self.tmp_mapset_path, "signatures", "libsvm"))
Path(self.tmp_mapset_path, "signatures", "libsvm").is_dir()
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ruff] reported by reviewdog 🐶

Suggested change
self.assertTrue(
os.path.isdir(os.path.join(self.tmp_mapset_path, "signatures", "libsvm"))
Path(self.tmp_mapset_path, "signatures", "libsvm").is_dir()
)
self.assertTrue(Path(self.tmp_mapset_path, "signatures", "libsvm").is_dir())

@echoix echoix closed this Nov 9, 2025
@echoix
echoix deleted the ruff-PTH113-os-path-isfile-and-others branch November 9, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant