コード例 #1
0
ファイル: config.py プロジェクト: CultureCounts/pygal
 def _update(self, kwargs):
     """Update the config with the given dictionary"""
     from pygal.util import merge
     dir_self_set = set(dir(self))
     merge(
         self.__dict__,
         dict([(k, v) for (k, v) in kwargs.items()
               if not k.startswith('_') and k in dir_self_set]))
コード例 #2
0
ファイル: config.py プロジェクト: Frankie-666/pygal
 def _update(self, kwargs):
     """Update the config with the given dictionary"""
     from pygal.util import merge
     dir_self_set = set(dir(self))
     merge(
         self.__dict__, dict([
             (k, v) for (k, v) in kwargs.items()
             if not k.startswith('_') and k in dir_self_set]))
コード例 #3
0
ファイル: state.py プロジェクト: yzhen-hit/pygal
 def __init__(self, graph, **kwargs):
     """Create the transient state"""
     merge(self.__dict__, graph.config.__class__.__dict__)
     merge(self.__dict__, graph.config.__dict__)
     merge(self.__dict__, graph.__dict__)
     merge(self.__dict__, kwargs)
コード例 #4
0
ファイル: state.py プロジェクト: Kozea/pygal
 def __init__(self, graph, **kwargs):
     """Create the transient state"""
     merge(self.__dict__, graph.config.__class__.__dict__)
     merge(self.__dict__, graph.config.__dict__)
     merge(self.__dict__, graph.__dict__)
     merge(self.__dict__, kwargs)