Skip to content

Commit 8610bcb

Browse files
committed
👕 Collapse a double if
1 parent 7e14708 commit 8610bcb

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/textual_fspicker/parts/directory_navigation.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,12 @@ def hide(self, path: Path) -> bool:
348348
`True` if the path should be hidden, `False` if not.
349349
"""
350350
# If there's a custom filter in place, give that a go first...
351-
if self.file_filter is not None and is_file(path):
352-
if not self.file_filter(path):
353-
return True
351+
if (
352+
self.file_filter is not None
353+
and is_file(path)
354+
and not self.file_filter(path)
355+
):
356+
return True
354357
# Either there is no custom filter, or whatever we're looking at
355358
# passed so far; not do final checks.
356359
return self.is_hidden(path) and not self.show_hidden

0 commit comments

Comments
 (0)