Skip to content

Commit

Permalink
blackify (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
Almenon authored Nov 15, 2024
1 parent 5f1aac1 commit 3f5607a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python/arepl_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def next_batch(X, Y):
for i in range(epochs): # Training:
epochLoss = []

for (Xb, Yb) in next_batch(X, Y):
for Xb, Yb in next_batch(X, Y):

H = activate(np.dot(Xb, Wh)) # hidden layer results
Z = activate(np.dot(H, Wz)) # output layer results
Expand Down
2 changes: 2 additions & 0 deletions python/arepl_overloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
For example, arepl doesn't support stdin so we overload input and help
"""


# AREPL-vscode does not support stdin yet so help breaks it
# by overridding help with a non-stdin version we can prevent AREPL-vscode from freezing up
# just a temp fix untill AREPL-vscode supports stdin
Expand All @@ -25,6 +26,7 @@ def help_overload(arg: Any = None):

arepl_input_iterator = None


# AREPL doesn't support input so we overload input
# This allows users to hardcode input by specifying a standard_input var
def input_overload(prompt: str = None) -> str:
Expand Down
8 changes: 5 additions & 3 deletions python/arepl_python_evaluator.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from copy import deepcopy
from importlib import util # https://stackoverflow.com/questions/39660934/error-when-using-importlib-util-to-check-for-library
from importlib import (
util,
) # https://stackoverflow.com/questions/39660934/error-when-using-importlib-util-to-check-for-library
import json
import traceback
from time import time
Expand Down Expand Up @@ -237,8 +239,8 @@ def main(json_input: str):
# This is to avoid results conflicting with user writes to stdout
arepl_result_stream.open_result_stream()

finished_starting = ReturnInfo("", {}, 0,0, startResult=True)
finished_starting = ReturnInfo("", {}, 0, 0, startResult=True)
print_output(finished_starting)

while True:
main(input())
2 changes: 1 addition & 1 deletion python/linter_req.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
black==22.3.0
black==24.8.0
1 change: 1 addition & 0 deletions python/test_python_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ def compile_async_tasks():
vars = jsonpickle.decode(return_info.userVariables)
assert "x" in vars


def test_arepl_store():
python_evaluator.exec_input(python_evaluator.ExecArgs("arepl_store=5"))
return_info = python_evaluator.exec_input(python_evaluator.ExecArgs("x=arepl_store"))
Expand Down

0 comments on commit 3f5607a

Please sign in to comment.