1
0
Fork 0
forked from github/pelican

Cleanup imports

This commit is contained in:
Jake Howard 2023-08-15 17:49:58 +01:00 committed by Deniz Turgut
commit 631ac1bdb3
No known key found for this signature in database
GPG key ID: 87B7168D7AB3ED2F
3 changed files with 5 additions and 7 deletions

View file

@ -760,7 +760,9 @@ def order_content(content_list, order_by='slug'):
def wait_for_changes(settings_file, reader_class, settings):
content_path = settings.get('PATH', '')
theme_path = settings.get('THEME', '')
ignore_files = set(settings.get('IGNORE_FILES', []))
ignore_files = set(
fnmatch.translate(pattern) for pattern in settings.get('IGNORE_FILES', [])
)
watching_paths = [
settings_file,
@ -780,9 +782,7 @@ def wait_for_changes(settings_file, reader_class, settings):
return next(watchfiles.watch(
*watching_paths,
watch_filter=watchfiles.DefaultFilter(
ignore_entity_patterns=[fnmatch.translate(pattern) for pattern in ignore_files]
),
watch_filter=watchfiles.DefaultFilter(ignore_entity_patterns=ignore_files),
rust_timeout=0
))