MCPcopy Create free account
hub / github.com/brain-workshop/brainworkshop / update

Method update

brainworkshop.py:3496–3505  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3494 anchor_x='right', anchor_y='top', batch=batch)
3495 self.update()
3496 def update(self):
3497 if mode.started or CLINICAL_MODE:
3498 self.label.text = ''
3499 else:
3500 sessions = [sess for sess in stats.history if sess[1] == mode.mode][-20:]
3501 if sessions:
3502 average = sum([sess[2] for sess in sessions]) / float(len(sessions))
3503 else:
3504 average = 0.
3505 self.label.text = _("%sNB average: %1.2f") % (mode.short_mode_names[mode.mode], average)
3506
3507
3508class TodayLabel:

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected