Comments (6)
Hi @Rahuum
Can you provide an example of function that doesn't work ?
The current version of Pyment supports async functions. See issue #88.
For instance:
async def func(param):
pass
Will produce:
--- a/test.py
+++ b/test.py
@@ -1,3 +1,8 @@
async def func(param):
+ """
+
+ :param param:
+
+ """
pass
from pyment.
Sure.
(env) [Rahuum@#####-main:src]$ cat test.py (03-06 22:51)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import asyncio
import opcodes
async def ping_runner(self):
await self.send(*opcodes.CMSG_PING(self))
await asyncio.sleep(30)
(env) [Rahuum@#####-main:src]$ pyment test.py (03-06 22:51)
(env) [Rahuum@#####-main:src]$ cat test.py.patch (03-06 22:51)
# Patch generated by Pyment v0.3.3
(env) [Rahuum@#####-main:src]$ (03-06 22:51)
Pulled an example out into a minimal test file, but pretty much every async function (all of them? haven't checked, there's thousands) gets missed.
from pyment.
@Rahuum I think you didn't use the last version of Pyment. After a git pull and activating a virtualenv, please run python setup.py install
before using Pyment.
Using your example produces:
--- a/issue94.py
+++ b/issue94.py
@@ -4,5 +4,6 @@
import opcodes
async def ping_runner(self):
+ """ """
await self.send(*opcodes.CMSG_PING(self))
await asyncio.sleep(30)
from pyment.
Has this been pushed to pip? As you can see from the generated patch, I'm on v0.3.3, which seems to be the latest release.
from pyment.
No, I didn't! My bad, actually, I re-released a v0.3.3 on github not on pip but it was a mistake as it is a different version! I think I will reversion it to v0.3.4.
However, I am currently working on a v0.4.0 that will manage also the type hints. It will be this one that I will release on pip.
I hope soon! Work is in progress.
from pyment.
@Rahuum
I close this issue as it is fixed in current master version.
You can track for next Pypi release.
from pyment.
Related Issues (20)
- PyPi Package Update HOT 4
- Please add example on how to specify output format HOT 2
- Type annotations cause converted docstrings to break HOT 2
- It does not work with raw docstring HOT 1
- Is this project still maintained ? HOT 1
- Removes stub docstrings
- Messes up tabs
- Fails to recognize \n line ending files and is using \r\n under Windows
- No support for async functions HOT 1
- Crash on nested square brackets in type annotation
- Feature Request: docstring style for sphinx-autodoc-typehints HOT 1
- Broken docstring HOT 2
- Pyment not respecting type annotations
- Treats r-strings incorrectly
- Breaking existing numpy docstring.
- Feature Request: Publish/Deploy Sphinx Documentation Website
- Conversions Adds Type Hints to Google Style Docstrings.
- Wrong docstring when complex types are used like Callable[...]
- UnicodeDecodeError charmap (On Windows) HOT 1
- Type is removed from parameter if not in type hints when converting reST docstring
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 pyment.