Skip to content

Latest commit

 

History

History
38 lines (24 loc) · 722 Bytes

CONTRIBUTING.md

File metadata and controls

38 lines (24 loc) · 722 Bytes

Code Style

We use Black (PEP 8 compliant) for code formatting.

Install it to format your code after writing code or use it in your IDE as code formatter.

To format run:

black dialect

We also use isort for imports sorting.

isort dialect

Type Annotations

We try to use Python type annotations whenever is possible.

When to omit annotations?

  • Explicit classes instantiation like:

    var = Class()
  • Non-nullable argument with default value:

    # We omit `int` typing for `number`
    def method(text: str, number = 5, other: int | None = 20):
        ...