entangled-cli 2.0.3__tar.gz → 2.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/PKG-INFO +1 -1
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/status.py +13 -2
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/pyproject.toml +1 -1
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/LICENSE +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/README.md +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/__init__.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/code_reader.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/commands/__init__.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/commands/brei.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/commands/new.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/commands/status.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/commands/stitch.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/commands/sync.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/commands/tangle.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/commands/watch.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/config/__init__.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/config/language.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/config/templates.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/config/version.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/construct.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/document.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/errors/__init__.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/errors/internal.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/errors/user.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/filedb.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/hooks/__init__.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/hooks/base.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/hooks/build.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/hooks/quarto_attributes.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/hooks/task.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/logging.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/main.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/markdown_reader.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/parsing.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/properties.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/py.typed +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/tangle.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/text_location.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/transaction.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/utility.py +0 -0
- {entangled_cli-2.0.3 → entangled_cli-2.0.4}/entangled/version.py +0 -0
|
@@ -5,6 +5,17 @@ from itertools import chain
|
|
|
5
5
|
from pathlib import Path
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
def safe_glob(pattern):
|
|
9
|
+
"""The `glob` method of `Path` raises a FileNotFound error when
|
|
10
|
+
there are rapid changes in the filesystem.
|
|
11
|
+
|
|
12
|
+
`safe_glob` catches this error and returns an empty list instead."""
|
|
13
|
+
try:
|
|
14
|
+
return Path().glob(pattern)
|
|
15
|
+
except FileNotFoundError:
|
|
16
|
+
return []
|
|
17
|
+
|
|
18
|
+
|
|
8
19
|
def find_watch_dirs():
|
|
9
20
|
"""List all directories that contain files that need watching."""
|
|
10
21
|
input_file_list = list_input_files()
|
|
@@ -16,9 +27,9 @@ def find_watch_dirs():
|
|
|
16
27
|
|
|
17
28
|
def list_input_files():
|
|
18
29
|
"""List all input files."""
|
|
19
|
-
include_file_list = chain.from_iterable(map(
|
|
30
|
+
include_file_list = chain.from_iterable(map(safe_glob, config.watch_list))
|
|
20
31
|
exclude_file_list = list(
|
|
21
|
-
chain.from_iterable(map(
|
|
32
|
+
chain.from_iterable(map(safe_glob, config.ignore_list))
|
|
22
33
|
)
|
|
23
34
|
return [path for path in include_file_list if not path in exclude_file_list]
|
|
24
35
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|