MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / is_empty_instance

Function is_empty_instance

keepercommander/commands/pam_import/base.py:3295–3302  ·  view source on GitHub ↗

Checks if all attributes (not on skiplist) are None

(obj, skiplist: Optional[List[str]] = None)

Source from the content-addressed store, hash-verified

3293 return obj
3294
3295def is_empty_instance(obj, skiplist: Optional[List[str]] = None):
3296 """ Checks if all attributes (not on skiplist) are None """
3297 if not obj: return True
3298 if not isinstance(skiplist, list): skiplist= []
3299 for attr, value in vars(obj).items():
3300 if not (attr in skiplist or value is None):
3301 return False
3302 return True
3303
3304def is_blank_instance(obj, skiplist: Optional[List[str]] = None):
3305 """ Checks if all attributes (not on skiplist) are None or empty """

Callers 4

loadMethod · 0.85
loadMethod · 0.85
is_emptyMethod · 0.85
loadMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected