MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / _remove_keys

Function _remove_keys

web/pgadmin/tools/schema_diff/directory_compare.py:887–900  ·  view source on GitHub ↗

Remove non required keys form both source and target object. :param ignore_keys: ignore keys list. :param source_with_ignored_keys: source keys list. :param target_with_ignored_keys: target keys list. :return: None

(ignore_keys, source_with_ignored_keys,
                 target_with_ignored_keys)

Source from the content-addressed store, hash-verified

885
886
887def _remove_keys(ignore_keys, source_with_ignored_keys,
888 target_with_ignored_keys):
889 """
890 Remove non required keys form both source and target object.
891 :param ignore_keys: ignore keys list.
892 :param source_with_ignored_keys: source keys list.
893 :param target_with_ignored_keys: target keys list.
894 :return: None
895 """
896 for ig_key in ignore_keys:
897 if ig_key in source_with_ignored_keys:
898 del source_with_ignored_keys[ig_key]
899 if ig_key in target_with_ignored_keys:
900 del target_with_ignored_keys[ig_key]
901
902
903def _compare_source_and_target(source_with_ignored_keys,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected