changeset 221:ca9d5a0dc9bb

Rename WalkDirEntry.sort_key and WalkDirEntry.alt_sort_key
author Franz Glasner <fzglas.hg@dom66.de>
date Sat, 25 Jan 2025 13:58:33 +0100
parents 8db78850d800
children d7be68a8937d
files cutils/treesum.py cutils/util/walk.py
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/cutils/treesum.py	Sat Jan 25 13:50:21 2025 +0100
+++ b/cutils/treesum.py	Sat Jan 25 13:58:33 2025 +0100
@@ -598,9 +598,9 @@
         with walk.ScanDir(path) as dirscan:
             fsobjects = list(dirscan)
         if self._utf8_mode:
-            fsobjects.sort(key=walk.WalkDirEntry.alt_sort_key)
+            fsobjects.sort(key=walk.WalkDirEntry.sort_key_u8)
         else:
-            fsobjects.sort(key=walk.WalkDirEntry.sort_key)
+            fsobjects.sort(key=walk.WalkDirEntry.sort_key_fs)
         dir_dgst = self._algorithm[0]()
         dir_size = 0
         dir_tainted = False
--- a/cutils/util/walk.py	Sat Jan 25 13:50:21 2025 +0100
+++ b/cutils/util/walk.py	Sat Jan 25 13:58:33 2025 +0100
@@ -295,11 +295,11 @@
         return w
 
     @staticmethod
-    def sort_key(entry):
+    def sort_key_fs(entry):
         return entry.alt_fsname     # because it should never throw
 
     @staticmethod
-    def alt_sort_key(entry):
+    def sort_key_u8(entry):
         return entry.alt_u8name     # because it should never throw
 
     if PY2: