1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2025-05-08 17:59:50 +00:00

Compare commits

..

2 Commits

Author SHA1 Message Date
4f252480d3
Fix pywin32 dependency 2020-06-30 00:52:04 -05:00
5cc439d846
Clean up rest of DeprecationWarnings 2020-06-30 00:51:06 -05:00
4 changed files with 9 additions and 9 deletions

View File

@ -224,7 +224,7 @@ class Directories:
root = ET.parse(infile).getroot() root = ET.parse(infile).getroot()
except Exception: except Exception:
return return
for rdn in root.getiterator("root_directory"): for rdn in root.iter("root_directory"):
attrib = rdn.attrib attrib = rdn.attrib
if "path" not in attrib: if "path" not in attrib:
continue continue
@ -233,7 +233,7 @@ class Directories:
self.add_path(Path(path)) self.add_path(Path(path))
except (AlreadyThereError, InvalidPathError): except (AlreadyThereError, InvalidPathError):
pass pass
for sn in root.getiterator("state"): for sn in root.iter("state"):
attrib = sn.attrib attrib = sn.attrib
if not ("path" in attrib and "value" in attrib): if not ("path" in attrib and "value" in attrib):
continue continue

View File

@ -241,13 +241,13 @@ class Results(Markable):
self.apply_filter(None) self.apply_filter(None)
root = ET.parse(infile).getroot() root = ET.parse(infile).getroot()
group_elems = list(root.getiterator("group")) group_elems = list(root.iter("group"))
groups = [] groups = []
marked = set() marked = set()
for group_elem in j.iter_with_progress(group_elems, every=100): for group_elem in j.iter_with_progress(group_elems, every=100):
group = engine.Group() group = engine.Group()
dupes = [] dupes = []
for file_elem in group_elem.getiterator("file"): for file_elem in group_elem.iter("file"):
path = file_elem.get("path") path = file_elem.get("path")
words = file_elem.get("words", "") words = file_elem.get("words", "")
if not path: if not path:
@ -260,7 +260,7 @@ class Results(Markable):
dupes.append(file) dupes.append(file)
if file_elem.get("marked") == "y": if file_elem.get("marked") == "y":
marked.add(file) marked.add(file)
for match_elem in group_elem.getiterator("match"): for match_elem in group_elem.iter("match"):
try: try:
attrs = match_elem.attrib attrs = match_elem.attrib
first_file = dupes[int(attrs["first"])] first_file = dupes[int(attrs["first"])]

View File

@ -414,12 +414,12 @@ class TestCaseResultsMarkings:
f.seek(0) f.seek(0)
doc = ET.parse(f) doc = ET.parse(f)
root = doc.getroot() root = doc.getroot()
g1, g2 = root.getiterator("group") g1, g2 = root.iter("group")
d1, d2, d3 = g1.getiterator("file") d1, d2, d3 = g1.iter("file")
eq_("n", d1.get("marked")) eq_("n", d1.get("marked"))
eq_("n", d2.get("marked")) eq_("n", d2.get("marked"))
eq_("y", d3.get("marked")) eq_("y", d3.get("marked"))
d1, d2 = g2.getiterator("file") d1, d2 = g2.iter("file")
eq_("n", d1.get("marked")) eq_("n", d1.get("marked"))
eq_("y", d2.get("marked")) eq_("y", d2.get("marked"))

View File

@ -1,3 +1,3 @@
PyQt5 >=5.4,<6.0 PyQt5 >=5.4,<6.0
pypiwin32>=200 pywin32>=200
pyinstaller>=3.4,<4.0 pyinstaller>=3.4,<4.0