Comments (9)
Thanks for reporting, will look into that!
from typed-astunparse.
(Also see that the docstring does not use """
.)
from typed-astunparse.
I've verified that the per-argument type comments are indeed not working. I'll fix it.
However, the docstring issue is out of scope for this unparser. There was a similar issue upstream (astunparse): simonpercivall/astunparse#13 however it was closed.
I'm working towards implementing proper docstring unparsing, (as well as arbitrary comment parsing and unparsing) in a different module: https://github.com/mbdevpl/horast however it's not nearly ready yet.
from typed-astunparse.
And, there seems to be an issue in typed_ast
with parsing per-argument type comments in all cases: python/typed_ast#58 so even if I generate valid code, in some cases I actually cannot verify its validity.
from typed-astunparse.
Thanks for looking into this.
from typed-astunparse.
(BTW, I used your project here: nvbn/py-backwards#44)
from typed-astunparse.
Not minding the issue with typed_ast (hopefully it'll get resolved someday) I added the per-argument type comment unparsing and released https://pypi.python.org/pypi/typed-astunparse/2.0.2
from typed-astunparse.
Oho! Thanks!
from typed-astunparse.
Oh, and BTW, I just found out that docstrings might be properly stored in AST starting from Python 3.7 - if they will be, then I guess astunparse and typed_astunparse will handle them properly. https://bugs.python.org/issue29463
from typed-astunparse.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typed-astunparse.