MCPcopy Create free account
hub / github.com/BIT-DataLab/LakeBench / _parse_config

Method _parse_config

join/LSH/datasketch/storage.py:744–758  ·  view source on GitHub ↗

Parse a configuration dictionary, optionally fetching data from env variables. :param dict[str, any] config: the configuration :rtype: dict[str, str] :return: the parse configuration

(config)

Source from the content-addressed store, hash-verified

742
743 @staticmethod
744 def _parse_config(config):
745 """
746 Parse a configuration dictionary, optionally fetching data from env variables.
747
748 :param dict[str, any] config: the configuration
749 :rtype: dict[str, str]
750 :return: the parse configuration
751 """
752 cfg = {}
753 for key, value in config.items():
754 if isinstance(value, dict):
755 if 'env' in value:
756 value = os.getenv(value['env'], value.get('default', None))
757 cfg[key] = value
758 return cfg
759
760 @property
761 def buffer_size(self):

Callers 1

__init__Method · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected