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

Method update

brainworkshop.py:3517–3529  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3515 anchor_x='right', anchor_y='top',width=scale_to_width(280), multiline=True, batch=batch)
3516 self.update()
3517 def update(self):
3518 if mode.started:
3519 self.labelTitle.text = ''
3520 else:
3521 total_trials = sum([mode.num_trials + mode.num_trials_factor * \
3522 his[2] ** mode.num_trials_exponent for his in stats.history])
3523 total_time = mode.ticks_per_trial * TICK_DURATION * total_trials
3524
3525 self.labelTitle.text = _(
3526 ("%i min %i sec done today in %i sessions\n" \
3527 + "%i min %i sec done in last 24 hours in %i sessions") \
3528 % (stats.time_today//60, stats.time_today%60, stats.sessions_today, \
3529 stats.time_thours//60, stats.time_thours%60, stats.sessions_thours))
3530
3531class TrialsRemainingLabel:
3532 def __init__(self):

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected