Skip to content

Commit

Permalink
style: fix docstring formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Dineshkarthik committed Dec 21, 2020
1 parent 253708b commit 28fa1d9
Showing 1 changed file with 43 additions and 43 deletions.
86 changes: 43 additions & 43 deletions CONTRIBUTING.md
Expand Up @@ -119,39 +119,39 @@ A Python docstring is a string used to document a Python module, class, function
The next example gives an idea of what a docstring looks like:
```py
def add(num1: int, num2: int) -> int:
"""
Add up two integer numbers.
This function simply wraps the ``+`` operator, and does not
do anything interesting, except for illustrating what
the docstring of a very simple function looks like.
Parameters
----------
num1 : int
First number to add.
num2 : int
Second number to add.
Returns
-------
int
The sum of ``num1`` and ``num2``.
See Also
--------
subtract : Subtract one integer from another.
Examples
--------
>>> add(2, 2)
4
>>> add(25, 0)
25
>>> add(10, -10)
0
"""
return num1 + num2
"""
Add up two integer numbers.
This function simply wraps the ``+`` operator, and does not
do anything interesting, except for illustrating what
the docstring of a very simple function looks like.
Parameters
----------
num1: int
First number to add.
num2: int
Second number to add.
Returns
-------
int
The sum of ``num1`` and ``num2``.
See Also
--------
subtract : Subtract one integer from another.
Examples
--------
>>> add(2, 2)
4
>>> add(25, 0)
25
>>> add(10, -10)
0
"""
return num1 + num2
```
Some standards regarding docstrings exist, which make them easier to read, and allow them be easily exported to other formats such as html or pdf.

Expand All @@ -169,16 +169,16 @@ telegram-media-downloader uses a convention for commit message prefixes and layo

Must be one of the following:
- **add**: Adding a new file
- **ci**: Changes to CI configuration files and scripts (example: files inside `.github` folder)
- **clean**: Code cleanup
- **docs**: Additions/updates to documentation
- **enh**: Enhancement, new functionality
- **fix**: Bug fix
- **perf**: A code change that improves performance
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, etc)
- **test**: Additions/updates to tests
- **type**: Type annotations
- **ci**: Changes to CI configuration files and scripts (example: files inside `.github` folder)
- **clean**: Code cleanup
- **docs**: Additions/updates to documentation
- **enh**: Enhancement, new functionality
- **fix**: Bug fix
- **perf**: A code change that improves performance
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, etc)
- **test**: Additions/updates to tests
- **type**: Type annotations

#### Subject:

Expand Down

0 comments on commit 28fa1d9

Please sign in to comment.