TexteaInc / funix

Building web apps without manually creating widgets
http://funix.io
MIT License
89 stars 10 forks source link

`return` must follow with an expression #65

Closed forrestbao closed 1 year ago

forrestbao commented 1 year ago

How to repeat:

Create a simple function decorated with Funix and save the code as test.py:

@funix.funix()
def test() -> int:
    return #line break
    1234 

Then execute funix test at the terminal. Then run the function in the browser.

Finally, this is the screenshot where 1234 (the expected result) is not displayed but a null.

image

The issue will be gone, if the last line is return 1234.

forrestbao commented 1 year ago

My bad. I misunderstood the syntax of the return statement.