hgext/fsmonitor/__init__.py
changeset 44452 9d2b2df2c2ba
parent 44062 2d49482d0dd4
child 44829 017cc5ee537f
--- a/hgext/fsmonitor/__init__.py	Fri Mar 06 10:52:44 2020 +0100
+++ b/hgext/fsmonitor/__init__.py	Fri Mar 06 13:27:41 2020 -0500
@@ -397,7 +397,7 @@
     # for file paths which require normalization and we encounter a case
     # collision, we store our own foldmap
     if normalize:
-        foldmap = dict((normcase(k), k) for k in results)
+        foldmap = {normcase(k): k for k in results}
 
     switch_slashes = pycompat.ossep == b'\\'
     # The order of the results is, strictly speaking, undefined.
@@ -459,22 +459,16 @@
     if normalize:
         # any notable files that have changed case will already be handled
         # above, so just check membership in the foldmap
-        notefiles = set(
-            (
-                normalize(f, True, True)
-                for f in notefiles
-                if normcase(f) not in foldmap
-            )
-        )
-    visit = set(
-        (
-            f
+        notefiles = {
+            normalize(f, True, True)
             for f in notefiles
-            if (
-                f not in results and matchfn(f) and (f in dmap or not ignore(f))
-            )
-        )
-    )
+            if normcase(f) not in foldmap
+        }
+    visit = {
+        f
+        for f in notefiles
+        if (f not in results and matchfn(f) and (f in dmap or not ignore(f)))
+    }
 
     if not fresh_instance:
         if matchalways: