Skip to content

Commit 316f0c6

Browse files
authored
Merge pull request #567 from vitalis89/patch-1
Fix ignore_keys issue in detailed__dict__
2 parents be7d59f + a0ac96d commit 316f0c6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

deepdiff/helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -739,8 +739,8 @@ def detailed__dict__(obj: Any, ignore_private_variables: bool = True, ignore_key
739739
else:
740740
result = obj.__dict__.copy() # A shallow copy
741741
private_var_prefix = f"_{obj.__class__.__name__}__" # The semi private variables in Python get this prefix
742-
for key in ignore_keys:
743-
if key in result or (
742+
for key in obj.__dict__:
743+
if key in ignore_keys or (
744744
ignore_private_variables and key.startswith('__') and not key.startswith(private_var_prefix)
745745
):
746746
del result[key]

0 commit comments

Comments
 (0)