Comments (12)
It's in the works :)
from autodocstring.
Is this still being developed or the idea died ?
I see this format to be nice for classes
class Person:
"""
A class to represent a person.
...
Attributes
----------
name : str
first name of the person
surname : str
family name of the person
age : int
age of the person
Methods
-------
info(additional=""):
Prints the person's name and age.
"""
def __init__(self, name, surname, age):
"""
Constructs all the necessary attributes for the person object.
Parameters
----------
name : str
first name of the person
surname : str
family name of the person
age : int
age of the person
"""
self.name = name
self.surname = surname
self.age = age
def info(self, additional=""):
"""
Prints the person's name and age.
If the argument 'additional' is passed, then it is appended after the main info.
Parameters
----------
additional : str, optional
More info to be displayed (default is None)
Returns
-------
None
"""
print(f'My name is {self.name} {self.surname}. I am {self.age} years old.' + additional)
from autodocstring.
I really like this idea. @NilsJPWerner is this still in development? Thanks for writing a great extension!
from autodocstring.
I submitted a PR a while back, and Nils made some comments. I need to incorporate his suggestions and then resubmit. I have been super busy lately, but I will try to get this done within the next week or two. Thanks for inquiring guys. Hopefully it will provide the motivation to wrap this thing up.
from autodocstring.
The docstring as inserted for the class is inconsistent at least. If the class has superclass:
class Pipeline(PackageAwareObjectMixin):
"""[summary]
:param PackageAwareObjectMixin: [description]
:type PackageAwareObjectMixin: [type]
"""
If not it's fine but:
class Something:
"""[summary]
:raises ValueError: [description]
"""
def __init__(self, a, b=None):
raise ValueError('OMG!')
from autodocstring.
Interested in this as well!
from autodocstring.
Any update on this?
from autodocstring.
Hello, Nils. I actually added class docstrings and module docstrings. It seems to be working, but I haven't been able to get the original tests running. I had never used TypeScript before (or created an extension for that matter), so I'd like to get things tested. Should I just go ahead and create a PR?
from autodocstring.
I'm happy to go over it again @tracetidwell
from autodocstring.
I have a fork where I had this feature working for the previous version. I was still trying to debug some unreliable function detection when indented. It involved a modest re-write of the code parsing machinery. Is there any progress on similar features for the updated version, or should I update my fork and re-implement it against the new parsing and rendering machinery?
from autodocstring.
Has this been addressed? Having trouble generating docstring for classes unless it's within the constructor. Thanks
from autodocstring.
I second this. I'm specifically looking for the feature for classes so that the docstring includes attributes as defined in init. What is the status of this?
from autodocstring.
Related Issues (20)
- Parser gets confused with comments HOT 1
- Doesn't generate doctoring around comments using 3 quotes HOT 3
- [feature request] Update existing docstring HOT 1
- Extension host crashes
- module level google style docstring
- autodocstring
- return field should be named "returns"
- [feature request] add support for positional-only and keyword-only arguments
- Autocomplete python file metadata
- Extended summary missing HOT 1
- Update Node.js Version to 18 or Later used in Github actions
- [bug] Broken links in README.md
- [feature request] - Add setting to fold doc strings
- [feature request] - Create or update the docstring for the next declaration that preceeds the cursor
- python 3.12 generics support
- Regular code completion blocked by extension. HOT 1
- Empty doctrings being generated HOT 2
- Does not work. HOT 2
- Yield and Return parsing seems too eager
- Seemingly unable to comply with Pydocstyle (D413) `blank-line-after-last-section`
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 autodocstring.