Skip to content

Remove redundant is_valid_path#4646

Merged
svartkanin merged 1 commit into
archlinux:masterfrom
codefiles:rmv-is-valid-path
Jul 21, 2026
Merged

Remove redundant is_valid_path#4646
svartkanin merged 1 commit into
archlinux:masterfrom
codefiles:rmv-is-valid-path

Conversation

@codefiles

Copy link
Copy Markdown
Contributor

The combined expression path.exists() and path.is_dir() is redundant. Path.is_dir() returns False if the path is missing.

https://docs.python.org/3/library/pathlib.html#pathlib.Path.is_dir

@codefiles
codefiles requested a review from Torxed as a code owner July 20, 2026 01:23
@svartkanin
svartkanin merged commit 2f344a8 into archlinux:master Jul 21, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants