Batuhan Taskaya
Batuhan Taskaya
It seems like the project is still using 3.8, but it is causing some problems when experimenting with new syntax. I wonder whether we can bump it to Python 3.10?
Is there any plan to drop python 2 support, and refactor some parts with assuming only 3.5+ usage (or better, 3.6+)
```py >>> source = ast.parse('f"{ {1:2}}"') >>> astor = ast.parse(astor.to_source(source)) >>> stdlib = ast.parse(ast.unparse(source)) >>> ast.dump(source) 'Module(body=[Expr(value=JoinedStr(values=[FormattedValue(value=Dict(keys=[Constant(value=1)], values=[Constant(value=2)]), conversion=-1)]))], type_ignores=[])' >>> ast.dump(source) == ast.dump(stdlib) True >>> ast.dump(source) == ast.dump(astor) False...
``` >>> astor.to_source(ast.parse("a[(x, *y)]")) 'a[x, *y]\n' ``` Example PR to `ast.unparse`: https://github.com/python/cpython/pull/20152
Infinity numbers doesn't get handled in constant tuples, I'll prepare a patch tomorrow. ``` >>> my_constant = ast.Constant(value=(1, 2, 1e10000, "foo"), kind=None) >>> astor.to_source(my_constant) "(1, 2, inf, 'foo')\n" ``` Also...
Fixes #159 P.S: i am not adding changelog since i started a new version at [changelog](https://github.com/berkerpeksag/astor/blob/f320d6106f7358958203210f09115a2e54e16105/docs/changelog.rst) in #155
```py def foo(): # type: () -> None pass bar = 3 # type: int for baz in foo(): # type: ignore pass ```
I've been thinking for a day about how we can possibly implement [PEP 622]() in case of acceptance. While I was thinking, I drafted a piece of code, which might...
for >> (lambda: [(yield x + 1) for x in seq]) >>> get_errors("(lambda: [(yield x + 1) for x in seq])") [] >>> get_errors("(lambda: [(yield x + 1) for x...