htmlcmp 1.0.13__tar.gz → 1.0.15__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.
- {htmlcmp-1.0.13 → htmlcmp-1.0.15}/PKG-INFO +1 -1
- {htmlcmp-1.0.13 → htmlcmp-1.0.15}/pyproject.toml +1 -1
- {htmlcmp-1.0.13 → htmlcmp-1.0.15}/src/htmlcmp/compare_output_server.py +8 -8
- {htmlcmp-1.0.13 → htmlcmp-1.0.15}/src/htmlcmp.egg-info/PKG-INFO +1 -1
- {htmlcmp-1.0.13 → htmlcmp-1.0.15}/README.md +0 -0
- {htmlcmp-1.0.13 → htmlcmp-1.0.15}/setup.cfg +0 -0
- {htmlcmp-1.0.13 → htmlcmp-1.0.15}/src/htmlcmp/__init__.py +0 -0
- {htmlcmp-1.0.13 → htmlcmp-1.0.15}/src/htmlcmp/common.py +0 -0
- {htmlcmp-1.0.13 → htmlcmp-1.0.15}/src/htmlcmp/compare_output.py +0 -0
- {htmlcmp-1.0.13 → htmlcmp-1.0.15}/src/htmlcmp/html_render_diff.py +0 -0
- {htmlcmp-1.0.13 → htmlcmp-1.0.15}/src/htmlcmp/tidy_output.py +0 -0
- {htmlcmp-1.0.13 → htmlcmp-1.0.15}/src/htmlcmp.egg-info/SOURCES.txt +0 -0
- {htmlcmp-1.0.13 → htmlcmp-1.0.15}/src/htmlcmp.egg-info/dependency_links.txt +0 -0
- {htmlcmp-1.0.13 → htmlcmp-1.0.15}/src/htmlcmp.egg-info/entry_points.txt +0 -0
- {htmlcmp-1.0.13 → htmlcmp-1.0.15}/src/htmlcmp.egg-info/requires.txt +0 -0
- {htmlcmp-1.0.13 → htmlcmp-1.0.15}/src/htmlcmp.egg-info/top_level.txt +0 -0
- {htmlcmp-1.0.13 → htmlcmp-1.0.15}/tests/test_html_render_diff.py +0 -0
|
@@ -33,12 +33,14 @@ class Observer:
|
|
|
33
33
|
self._path = path
|
|
34
34
|
|
|
35
35
|
def dispatch(self, event):
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
event_type = event.event_type
|
|
37
|
+
src_path = Path(event.src_path)
|
|
38
38
|
|
|
39
|
-
if
|
|
40
|
-
|
|
39
|
+
if event_type in ["opened"]:
|
|
40
|
+
return
|
|
41
41
|
|
|
42
|
+
if src_path.is_file():
|
|
43
|
+
Config.comparator.submit(src_path.relative_to(self._path))
|
|
42
44
|
self._observer = watchdog.observers.Observer()
|
|
43
45
|
self._observer.schedule(Handler(Config.path_a), Config.path_a, recursive=True)
|
|
44
46
|
self._observer.schedule(Handler(Config.path_b), Config.path_b, recursive=True)
|
|
@@ -52,7 +54,7 @@ class Observer:
|
|
|
52
54
|
if not a.is_dir() or not b.is_dir():
|
|
53
55
|
raise ValueError("Both paths must be directories")
|
|
54
56
|
|
|
55
|
-
common_path = a
|
|
57
|
+
common_path = a.relative_to(Config.path_a)
|
|
56
58
|
|
|
57
59
|
left = sorted(p.name for p in a.iterdir())
|
|
58
60
|
right = sorted(p.name for p in b.iterdir())
|
|
@@ -106,8 +108,6 @@ class Comparator:
|
|
|
106
108
|
def compare(self, path: Path):
|
|
107
109
|
if not isinstance(path, Path):
|
|
108
110
|
raise TypeError("Path must be of type Path")
|
|
109
|
-
if not path.is_file():
|
|
110
|
-
raise ValueError("Path must be a file")
|
|
111
111
|
if path not in self._future:
|
|
112
112
|
raise RuntimeError("Path not submitted for comparison")
|
|
113
113
|
|
|
@@ -166,7 +166,7 @@ def root():
|
|
|
166
166
|
if not a.is_dir() or not b.is_dir():
|
|
167
167
|
raise ValueError("Both paths must be directories")
|
|
168
168
|
|
|
169
|
-
common_path = a
|
|
169
|
+
common_path = a.relative_to(Config.path_a)
|
|
170
170
|
|
|
171
171
|
left = sorted(p.name for p in a.iterdir())
|
|
172
172
|
right = sorted(p.name for p in b.iterdir())
|
|
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
|