Improve function docstrings
See original GitHub issueIs your feature request related to a problem? Please describe.
Several docstrings in the codebase are either incomplete or non-existing. The following docstring for example, does not contain a description:
and could therefore be improved to
/** Renders error message on the card.
* @param {string} message
* @param {string} secondaryMessage
* @returns {string}
*/
const renderError = (message, secondaryMessage = "") => {
return `
<svg width="495" height="120" viewBox="0 0 495 120" fill="none" xmlns="http://www.w3.org/2000/svg">
<style>
.text { font: 600 16px 'Segoe UI', Ubuntu, Sans-Serif; fill: #2F80ED }
.small { font: 600 12px 'Segoe UI', Ubuntu, Sans-Serif; fill: #252525 }
.gray { fill: #858585 }
</style>
<rect x="0.5" y="0.5" width="494" height="99%" rx="4.5" fill="#FFFEFE" stroke="#E4E2E2"/>
<text x="25" y="45" class="text">Something went wrong! file an issue at https://tiny.one/readme-stats</text>
<text data-testid="message" x="25" y="55" class="text small">
<tspan x="25" dy="18">${encodeHTML(message)}</tspan>
<tspan x="25" dy="18" class="gray">${secondaryMessage}</tspan>
</text>
</svg>
`;
};
while others like
don’t contain a docstring at al
Describe the solution you’d like
I think it would increase the developer experience if these docstrings were updated/added.
Issue Analytics
- State:
- Created a year ago
- Comments:20 (8 by maintainers)
Top Results From Across the Web
How to use docstrings to improve your Python code
Using docstrings in Python makes it easier to see what functions do, what arguments they accept, and what they return. Here's how to...
Read more >Start Writing Python Docstrings - Better Programming
Dear Python developer, start writing docstrings now! Proper documentation ensures that you're able to read and review your code weeks, even months later....
Read more >Python Docstring: Documenting And Introspecting Functions
This tutorial explains what is Python Docstring and how to use it to document Python functions with examples.
Read more >Python Docstrings (With Examples) - Programiz
Python docstrings are the string literals that appear right after the definition of a function, method, class, or module. Let's take an example....
Read more >How to Use Python Docstrings for Effective Code Documentation
Docstring Formats · Use triple double quotes to enclose docstrings. · Docstring ends with a dot. · It should describe the command of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@shivam1646 I added the last docstrings and merged #2129 into the master. Thanks for your contribution!
@rym-oualha Thanks for wanting to contribute to this repository. I already assigned @shivam1646, so it is best to wait till he creates a new pull request or states which files he is tackling.