Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature filter keep_keys #8456

Merged
Prev Previous commit
Next Next commit
Fix isinstance list.
  • Loading branch information
vbotka committed Jun 2, 2024
commit caefb2826289312f050130891ae6bb552bb2b743
4 changes: 2 additions & 2 deletions plugins/plugin_utils/keys_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def _keys_filter_target_str(target, matching_parameter):
* compiled regex if matching_parameter=regex
"""

if type(target) is list:
if isinstance(target, list):
for elem in target:
if not isinstance(elem, string_types):
msg = "The target items must be strings. %s is %s"
Expand Down Expand Up @@ -96,7 +96,7 @@ def _keys_filter_target_dict(target, matching_parameter):

# TODO: Complete and use this in filter replace_kees

if type(target) is list:
if isinstance(target, list):
for elem in target:
if not isinstance(elem, Mapping):
msg = "The target items must be dictionary. %s is %s"
Expand Down
Loading