mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Add docstring style to Contributing
This commit is contained in:
parent
2bfec7d549
commit
f9e5a25b36
|
@ -56,6 +56,13 @@ To help with that, we encourage you to install the git pre-commit
|
||||||
hook that will warn you when you try to commit code that fails these checks.
|
hook that will warn you when you try to commit code that fails these checks.
|
||||||
Guide for installing them is [here](http://flake8.pycqa.org/en/latest/user/using-hooks.html).
|
Guide for installing them is [here](http://flake8.pycqa.org/en/latest/user/using-hooks.html).
|
||||||
|
|
||||||
|
##### Additional styles applied
|
||||||
|
|
||||||
|
* Have docstrings on all public methods
|
||||||
|
* Use double-quotes for docstrings
|
||||||
|
* Multiline docstrings should be indented to the level of the first quote
|
||||||
|
* Doc-strings should follow the reST format (`:param xxx: ...`, `:return: ...`, `:raises KeyError: ... `)
|
||||||
|
|
||||||
### 3. Test if all type-hints are correct
|
### 3. Test if all type-hints are correct
|
||||||
|
|
||||||
#### Run mypy
|
#### Run mypy
|
||||||
|
|
|
@ -26,6 +26,8 @@ Alternatively (e.g. if your system is not supported by the setup.sh script), fol
|
||||||
|
|
||||||
This will install all required tools for development, including `pytest`, `flake8`, `mypy`, and `coveralls`.
|
This will install all required tools for development, including `pytest`, `flake8`, `mypy`, and `coveralls`.
|
||||||
|
|
||||||
|
Before opening a pull request, please familiarize yourself with our [Contributing Guidelines](https://github.com/freqtrade/freqtrade/blob/develop/CONTRIBUTING.md).
|
||||||
|
|
||||||
### Devcontainer setup
|
### Devcontainer setup
|
||||||
|
|
||||||
The fastest and easiest way to get started is to use [VSCode](https://code.visualstudio.com/) with the Remote container extension.
|
The fastest and easiest way to get started is to use [VSCode](https://code.visualstudio.com/) with the Remote container extension.
|
||||||
|
|
|
@ -195,6 +195,8 @@ class Order(_DECL_BASE):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_open_orders() -> List['Order']:
|
def get_open_orders() -> List['Order']:
|
||||||
"""
|
"""
|
||||||
|
Retrieve open orders from the database
|
||||||
|
:return: List of open orders
|
||||||
"""
|
"""
|
||||||
return Order.query.filter(Order.ft_is_open.is_(True)).all()
|
return Order.query.filter(Order.ft_is_open.is_(True)).all()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user