Comments (2)
Thank you for the feedback.
According to PEP 257, "The docstring for a function or method should summarize its behavior and document its arguments, return value(s), side effects, exceptions raised, and restrictions on when it can be called (all if applicable)".
Therefore, strictly speaking, I do not think it should be there,
If a function does not contain return
expression it always returns None
, so why write it down.
However, I am open to adding this (optional) functionality (PRs are welcome :-)).
I might implement it myself, but I can't promise when.
from vim-python-docstring.
You're right, it's debatable.
About your PEP 257 quote, one could argue that since a function always has a return value, then it's always applicable to document its return value (including None
).
I'll have a look into the actual code of your plugin, not a vim code expert, but maybe it's easy ;)
from vim-python-docstring.
Related Issues (20)
- f-string parameter to error message included among raised errors HOT 2
- Function without parameters HOT 1
- Missing colons in list of class Attributes HOT 1
- Add support for functions that enforce keyword-only arguments. HOT 2
- Vim 32 bits and Python 64 bit. HOT 2
- Doctring ERROR: module 'ast' has no attribute 'unparse' HOT 3
- style ignored in lunarvim HOT 2
- Attributes are not in order HOT 4
- Function without trailing empty line
- [Feature Request] remove the indent before the parameters in Numpy style HOT 3
- Update existing docstring HOT 2
- Improve code quality
- Improve error handling HOT 3
- E492: Not an editor command HOT 1
- Use of Type Hinting HOT 3
- Function without body
- Support type hints
- No type for docstring HOT 3
- Support async functions
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 vim-python-docstring.