コード例 #1
0
ファイル: whale_crazy.py プロジェクト: kamired22/hailwhale
 def curry_whale_instance_methods(self, attr='id'):
     if hasattr(self, attr):
         curry_instance_attribute(attr, 'plotpoints', self)
         curry_instance_attribute(attr, 'ratio_plotpoints', self)
         curry_instance_attribute(attr, 'totals', self)
         curry_instance_attribute(attr, 'count_now', self)
         curry_instance_attribute(attr, 'reset', self)
コード例 #2
0
ファイル: hail.py プロジェクト: johann8384/hailwhale
 def curry_hail_instance_methods(self, attr='id'):
     if hasattr(self, attr):
         for method in ['count', 'count_decided', 'spy_pos_key',
         'spy_pos', 'spy_key', 'spy_log', 'spy_at_key', 'get_spy']:
             curry_instance_attribute(attr, method, self,
                     with_class_name=True)
         for method in ['count', 'count_decided']:
             curry_related_dimensions(attr, method, self, with_class_name=True)
コード例 #3
0
ファイル: whale.py プロジェクト: bobwilliams/hailwhale
 def curry_whale_instance_methods(self, attr="id"):
     if hasattr(self, attr):
         for method in [
             "plotpoints",
             "ratio_plotpoints",
             "scalar_plotpoints",
             "totals",
             "count_now",
             "count_decided_now",
             "decide",
             "weighted_reasons",
             "reasons_for",
         ]:
             curry_instance_attribute(attr, method, self, with_class_name=True)
コード例 #4
0
 def curry_hail_instance_methods(self, attr='id'):
     if hasattr(self, attr):
         for method in [
                 'count', 'count_decided', 'spy_pos_key', 'spy_pos',
                 'spy_key', 'spy_log', 'spy_at_key', 'get_spy'
         ]:
             curry_instance_attribute(attr,
                                      method,
                                      self,
                                      with_class_name=True)
         for method in ['count', 'count_decided']:
             curry_related_dimensions(attr,
                                      method,
                                      self,
                                      with_class_name=True)
コード例 #5
0
ファイル: hail.py プロジェクト: mattseh/hailwhale
 def __init__(self, *args, **kwargs):
     if hasattr(self, 'id'):
         curry_instance_attribute('id', 'count', self)
         curry_instance_attribute('id', 'spy_pos_key', self)
         curry_instance_attribute('id', 'spy_pos', self)
         curry_instance_attribute('id', 'spy_key', self)
         curry_instance_attribute('id', 'spy_log', self)
         curry_instance_attribute('id', 'spy_at_key', self)
         curry_instance_attribute('id', 'get_spy', self)