Open jekbradbury opened 5 years ago
I get a different error, instead complaining about the last )
in the decorator. Surrounding the generator expression in []
seems to make it go away.
Writing this:
foo = (
{"testcase_name": "_jit_scan={}_jit_f={}".format(jit_scan, jit_f),
"jit_scan": jit_scan, "jit_f": jit_f}
for jit_scan in [False, True]
for jit_f in [False, True]
)
Does not produce any messages, so it's probably an issue in what we're allowing in the decorators.
A simple reproducer:
@foo(x for x in [])
def bar():
pass
Code like the following:
fails to parse with the Python language server (giving
unexpected token 'for'
). This is the pattern used throughout tests for the https://github.com/google/jax codebase, and is valid Python code for (at least) 2.7 and 3.5+.