Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
tab-cmd committed Jan 13, 2021
1 parent f465386 commit a0767b8
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 27 deletions.
8 changes: 4 additions & 4 deletions bcipy/gui/BCInterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,10 @@ def start_experiment(self) -> None:
"""
if self.check_input():
self.throw_alert_message(
title='BciPy Alert',
message='Task Starting ...',
message_type=AlertMessageType.INFO,
okay_to_exit=False)
title='BciPy Alert',
message='Task Starting ...',
message_type=AlertMessageType.INFO,
okay_to_exit=False)
cmd = (
f'python bci_main.py -e "{self.experiment}" '
f'-u "{self.user}" -t "{self.task}" -p "{self.parameter_location}"'
Expand Down
2 changes: 1 addition & 1 deletion bcipy/gui/gui_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def value(self) -> str:

def cast_value(self) -> Any:
"""Returns the value associated with the form input, cast to the correct type.
*If not defined by downstream classes, it will return the value.*
"""
self.value()
Expand Down
6 changes: 3 additions & 3 deletions bcipy/helpers/stimuli.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ def random_rsvp_calibration_inq_gen(alp, timing=[0.5, 1, 0.2],


def target_rsvp_inquiry_generator(alp, target_letter, parameters,
timing=[0.5, 1, 0.2],
color=['green', 'white', 'white'],
stim_length=10, is_txt=True):
timing=[0.5, 1, 0.2],
color=['green', 'white', 'white'],
stim_length=10, is_txt=True):
"""Target RSVP Inquiry Generator.
Generate target RSVPKeyboard inquiries.
Expand Down
20 changes: 10 additions & 10 deletions bcipy/helpers/triggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ def _calibration_trigger(experiment_clock: core.Clock,


def _write_triggers_from_inquiry_calibration(array: list,
trigger_file: TextIO,
offset: bool = False):
trigger_file: TextIO,
offset: bool = False):
"""Write triggers from calibration.
Helper Function to write trigger data to provided trigger_file. It assigns
Expand Down Expand Up @@ -146,10 +146,10 @@ def _write_triggers_from_inquiry_calibration(array: list,


def _write_triggers_from_inquiry_copy_phrase(array,
trigger_file,
copy_text,
typed_text,
offset=None):
trigger_file,
copy_text,
typed_text,
offset=None):
"""
Write triggers from copy phrase.
Expand Down Expand Up @@ -226,10 +226,10 @@ def _write_triggers_from_inquiry_free_spell(array, trigger_file):


def write_triggers_from_inquiry_icon_to_icon(inquiry_timing: List[Tuple],
trigger_file: TextIO,
target: str,
target_displayed: bool,
offset=None):
trigger_file: TextIO,
target: str,
target_displayed: bool,
offset=None):
"""
Write triggers from icon to icon task.
It writes in the following order:
Expand Down
6 changes: 3 additions & 3 deletions bcipy/tasks/rsvp/icon_to_icon.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ def user_wants_to_continue(self) -> bool:
return should_continue

def present_inquiry(self,
inq: List[str],
durations: List[float],
show_target: bool = False):
inq: List[str],
durations: List[float],
show_target: bool = False):
"""Present the given inquiry and return the trigger timing info.
Parameters:
----------
Expand Down
8 changes: 4 additions & 4 deletions bcipy/tasks/rsvp/main_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ def __init__(self,
self.is_txt_stim = is_txt_stim

self.list_series = [{'target': None, 'time_spent': 0,
'list_sti': [], 'list_distribution': [],
'decision': None}]
'list_sti': [], 'list_distribution': [],
'decision': None}]
self.time = 0
self.inquiry_counter = 0

Expand All @@ -161,7 +161,7 @@ def reset(self, state=''):
self.displayed_state = self.form_display_state(self.state)

self.list_series = [{'target': None, 'time_spent': 0,
'list_sti': [], 'list_distribution': []}]
'list_sti': [], 'list_distribution': []}]
self.time = 0
self.inquiry_counter = 0

Expand Down Expand Up @@ -224,7 +224,7 @@ def do_series(self):

# Initialize next series
self.list_series.append({'target': None, 'time_spent': 0,
'list_sti': [], 'list_distribution': []})
'list_sti': [], 'list_distribution': []})

self.stimuli_agent.do_series()
self.stopping_evaluator.do_series()
Expand Down
4 changes: 2 additions & 2 deletions bcipy/tasks/tests/test_evidence_fusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ def test_fusion(self):
self.assertEqual(lm_evidence[i], val)

for i, val in enumerate(conjugator.evidence_history['ERP']):
self.assertinquiryEqual(list(erp_evidence[i]), list(val))
self.assertSequenceEqual(list(erp_evidence[i]), list(val))

for i, val in enumerate(conjugator.evidence_history['FRP']):
self.assertinquiryEqual(list(frp_evidence[i]), list(val))
self.assertSequenceEqual(list(frp_evidence[i]), list(val))

for i, val in enumerate(conjugator.likelihood):
self.assertAlmostEqual(expected_posterior[i], val)

0 comments on commit a0767b8

Please sign in to comment.