Coding Guidelines
- don't import external libraries (just if really really essential...! )
- naming in english
- use meaningful and appropriate naming
Please follow the style guide below when adding functionalities.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32 | # imports
import math
import sys
from myclass import MyClass
# example function
def add_one(number:int) -> int:
"""Increase number by one.
Author: John Doe
Example:
>>> add_one(1)
Args:
number (int): a number
Returns:
int: number increased by one
"""
return number + 1
# Aligned with opening delimiter.
foo = long_function_name(var_one, var_two,
var_three, var_four)
if foo == 'blah':
do_blah_thing()
do_one()
do_two()
do_three()
|