diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 83d136cd..94eaab8f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -153,3 +153,28 @@ To disable _Pylint_ rule in source code, the comment line in following format ca +## Code style + +### Docstrings style +We are using [Google's docstring style](https://google.github.io/styleguide/pyguide.html). + +Here is simple example: +```python +def function_with_pep484_type_annotations(param1: int, param2: str) -> bool: + """Example function with PEP 484 type annotations. + + Args: + param1: The first parameter. + param2: The second parameter. + + Returns: + The return value. True for success, False otherwise. + + Raises: + ValueError: If the first parameter does not contain proper model name + """ +``` + +For further guidance, see the rest of our codebase, or check sources online. There are many, eg. [this one](https://gist.github.com/redlotus/3bc387c2591e3e908c9b63b97b11d24e). + +