Skip to content

Commit

Permalink
Fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Frank committed Oct 9, 2024
1 parent 6b40152 commit 3d39673
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/neuroagent/tools/bluenaas_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,6 @@ async def _arun(
) -> BaseToolOutput:
"""Run the BlueNaaS tool."""
logger.info("Running BlueNaaS tool")
if not current_injection__stimulus__amplitudes:
current_injection__stimulus__amplitudes = [0.1]
if not record_from:
record_from = [RecordingLocation()]

json_api = self.create_json_api(
current_injection__inject_to=current_injection__inject_to,
current_injection__stimulus__stimulus_type=current_injection__stimulus__stimulus_type,
Expand Down Expand Up @@ -156,8 +151,12 @@ def create_json_api(
conditions__max_time: int = 100,
conditions__time_step: float = 0.05,
conditions__seed: int = 100,
) -> dict[str, str | int | float]:
) -> dict[str, Any]:
"""Based on the simulation config, create a valid JSON for the API."""
if not current_injection__stimulus__amplitudes:
current_injection__stimulus__amplitudes = [0.1]
if not record_from:
record_from = [RecordingLocation()]
json_api = {
"currentInjection": {
"injectTo": current_injection__inject_to,
Expand Down

0 comments on commit 3d39673

Please sign in to comment.