Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
goebbert1 committed Aug 24, 2024
1 parent 0ecb6b4 commit 50b5678
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sphinx_autobuild/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ def __call__(self, path):

# Expand the pattern into a list of files that match a glob
matched_files = [
os.path.abspath(ii)
for ii in glob(pattern, recursive=True)
os.path.abspath(ii) for ii in glob(pattern, recursive=True)
]

if path_expanded in matched_files:
Expand All @@ -42,9 +41,10 @@ def __call__(self, path):
# They might not be necessary but leaving here just in case.
# Neither depends on the files actually being on disk.

if path.strip(os.path.sep).startswith(
(pattern.strip(os.path.sep) + os.path.sep, pattern + "/")
):
if path.strip(os.path.sep).startswith((
pattern.strip(os.path.sep) + os.path.sep,
pattern + "/",
)):
return True
if fnmatch.fnmatch(path, pattern):
return True
Expand Down

0 comments on commit 50b5678

Please sign in to comment.