Skip to content

Parameters

Vinicius Reif Biavatti edited this page Jul 25, 2022 · 3 revisions
  • When some function exceeds the line length, use break-line
  • Adjust the next line params to the same position of first line params
  • Never keep the parameter with the type hint in other line
  • When only the return type hint exceeds the line length, break only the return type hint with the parenthesis

✅ Do

def calculate_numbers(number_1: float, number_2: float, number_3: float,                
                      number_6: float) -> float:
    ...

def calculate_numbers(number_1: float, number_2: float, number_3: float                
                      ) -> float:
    ...

❌ Don't

def calculate_numbers(number_1: float, number_2: float, number_3: float,                
    number_6: float) -> float:
    ...

def calculate_numbers(number_1: float, number_2: float, number_3: \
                      float, number_6: float) -> float:
    ...

def calculate_numbers(
    number_1: float, 
    number_2: float, 
    number_3: float,                
    ) -> float:
    ...
Clone this wiki locally