From d302ccdf0ea9fd6bbbd0ee954b195c3f6772bcd6 Mon Sep 17 00:00:00 2001 From: Joachim Metz Date: Sun, 6 Oct 2024 09:02:53 +0200 Subject: [PATCH] Updated pylintrc to version 3.2 --- dfwinreg/interface.py | 6 ++---- dfwinreg/registry_searcher.py | 8 +++----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/dfwinreg/interface.py b/dfwinreg/interface.py index f12d513..4cc3777 100644 --- a/dfwinreg/interface.py +++ b/dfwinreg/interface.py @@ -65,8 +65,7 @@ def RecurseKeys(self): """ root_key = self.GetRootKey() if root_key: - for registry_key in root_key.RecurseKeys(): - yield registry_key + yield from root_key.RecurseKeys() def SetKeyPathPrefix(self, key_path_prefix): """Sets the Window Registry key path prefix. @@ -221,8 +220,7 @@ def RecurseKeys(self): """ yield self for subkey in self.GetSubkeys(): - for key in subkey.RecurseKeys(): - yield key + yield from subkey.RecurseKeys() class WinRegistryKeyHelper(object): diff --git a/dfwinreg/registry_searcher.py b/dfwinreg/registry_searcher.py index b53db2e..d7f1768 100644 --- a/dfwinreg/registry_searcher.py +++ b/dfwinreg/registry_searcher.py @@ -385,9 +385,8 @@ def _FindInKey(self, registry_key, find_specs, segment_index): if sub_find_specs: segment_index += 1 for sub_registry_key in registry_key.GetSubkeys(): - for matching_key_path in self._FindInKey( - sub_registry_key, sub_find_specs, segment_index): - yield matching_key_path + yield from self._FindInKey( + sub_registry_key, sub_find_specs, segment_index) def Find(self, find_specs=None): """Searches for matching keys within the Windows Registry. @@ -404,8 +403,7 @@ def Find(self, find_specs=None): root_registry_key = self._win_registry.GetRootKey() for sub_registry_key in root_registry_key.GetSubkeys(): - for matching_path in self._FindInKey(sub_registry_key, find_specs, 0): - yield matching_path + yield from self._FindInKey(sub_registry_key, find_specs, 0) def GetKeyByPath(self, key_path): """Retrieves a Windows Registry key for a path specification.