Use new style classes
This commit is contained in:
parent
75483334ff
commit
b23134da76
@ -4,7 +4,7 @@ import json
|
||||
from repeated_timer import RepeatedTimer
|
||||
|
||||
|
||||
class DashieSampler:
|
||||
class DashieSampler(object):
|
||||
def __init__(self, app, interval):
|
||||
self._app = app
|
||||
self._timer = RepeatedTimer(interval, self._sample)
|
||||
|
@ -6,7 +6,7 @@ from dashie_sampler import DashieSampler
|
||||
|
||||
class SynergySampler(DashieSampler):
|
||||
def __init__(self, *args, **kwargs):
|
||||
DashieSampler.__init__(self, *args, **kwargs)
|
||||
super(SynergySampler, self).__init__(*args, **kwargs)
|
||||
self._last = 0
|
||||
|
||||
def name(self):
|
||||
@ -22,7 +22,7 @@ class SynergySampler(DashieSampler):
|
||||
|
||||
class HotnessSampler(DashieSampler):
|
||||
def __init__(self, *args, **kwargs):
|
||||
DashieSampler.__init__(self, *args, **kwargs)
|
||||
super(HotnessSampler, self).__init__(*args, **kwargs)
|
||||
self._last = 0
|
||||
|
||||
def name(self):
|
||||
@ -60,7 +60,7 @@ class ConvergenceSampler(DashieSampler):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.seedX = 0
|
||||
self.items = collections.deque()
|
||||
DashieSampler.__init__(self, *args, **kwargs)
|
||||
super(ConvergenceSampler, self).__init__(*args, **kwargs)
|
||||
|
||||
def sample(self):
|
||||
self.items.append({'x': self.seedX,
|
||||
@ -74,7 +74,7 @@ class ConvergenceSampler(DashieSampler):
|
||||
|
||||
class ProgressBarsSampler(DashieSampler):
|
||||
def __init__(self, *args, **kwargs):
|
||||
DashieSampler.__init__(self, *args, **kwargs)
|
||||
super(ProgressBarsSampler, self).__init__(*args, **kwargs)
|
||||
|
||||
def name(self):
|
||||
return 'progress_bars'
|
||||
@ -90,7 +90,7 @@ class ProgressBarsSampler(DashieSampler):
|
||||
|
||||
class UsageGaugeSampler(DashieSampler):
|
||||
def __init__(self, *args, **kwargs):
|
||||
DashieSampler.__init__(self, *args, **kwargs)
|
||||
super(UsageGaugeSampler, self).__init__(*args, **kwargs)
|
||||
|
||||
def name(self):
|
||||
return 'usage_gauge'
|
||||
|
@ -5,7 +5,7 @@ from pydashie.dashie_sampler import DashieSampler
|
||||
|
||||
class TrelloSampler(DashieSampler):
|
||||
def __init__(self, *args, **kwargs):
|
||||
DashieSampler.__init__(self, *args, **kwargs)
|
||||
super(TrelloSampler, self).__init__(*args, **kwargs)
|
||||
self._last = 0
|
||||
self.key = '0667001bfafc26b53864fd08124159f0'
|
||||
self.secret = 'cb6a56444019998b879015c53a17f695700e6dd2f6f147870f27aff89e156c2b'
|
||||
|
@ -5,7 +5,7 @@ from pydashie.dashie_sampler import DashieSampler
|
||||
|
||||
class WebsiteUpSampler(DashieSampler):
|
||||
def __init__(self, *args, **kwargs):
|
||||
DashieSampler.__init__(self, *args, **kwargs)
|
||||
super(WebsiteUpSampler, self).__init__(*args, **kwargs)
|
||||
self._last = 0
|
||||
self.page = 'http://www.google.com'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user