Skip to content

Commit

Permalink
Updated pylintrc to version 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Oct 6, 2024
1 parent ee40445 commit d302ccd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
6 changes: 2 additions & 4 deletions dfwinreg/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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):
Expand Down
8 changes: 3 additions & 5 deletions dfwinreg/registry_searcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit d302ccd

Please sign in to comment.