hikari-py/hikari

View on GitHub
.flake8

Summary

Maintainability
Test Coverage
[flake8]
count = true

# A002:  Argument is shadowing a python builtin.
# A003: Class attribute is shadowing a python builtin.
# A005: Module is shadowing a python builtin module.
# CFQ002: Function has too many arguments.
# CFQ004: Function has too many returns.
# D102: Missing docstring in public method.
# D105: Magic methods not having a docstring.
# D412: No blank lines allowed between a section header and its content
# E402: Module level import not at top of file (isn't compatible with our import style).
# E701, E704: Multiple statements on one line (conflicts with black, but it will be enforced by it anyways).
# T101: TO-DO comment detection (T102 is FIX-ME and T103 is XXX).
# S101: Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
# W503: line break before binary operator (too many false positives and doesnt match our style)
# W504: line break after binary operator (too many false positives and doesnt match our style)
ignore =
    A002,
    A003,
    A005,
    CFQ002,
    CFQ004,
    D102,
    D105,
    D412,
    E402,
    E701,
    E704,
    T101,
    S101,
    W503,
    W504,

# F401: unused import.
# F403: cannot detect unused vars if we use starred import
# FS003: f-string missing prefix.
# S106: possible hardcoded password (we dont care about this in the tests)
# D106, D104, D103, D101, D100: Missing docstring in public function/class/module (ignore in tests)
per-file-ignores =
    hikari/__init__.py:                 F401,F403
    hikari/api/__init__.py:             F401,F403
    hikari/events/__init__.py:          F401,F403
    hikari/impl/__init__.py:            F401,F403
    hikari/interactions/__init__.py:    F401,F403
    hikari/internal/routes.py:          FS003
    hikari/internal/time.py:            FS003
    tests/hikari/*:                     FS003,S106,D106,D104,D103,D101,D100,S105

max-complexity = 20
max-function-length = 130
# Technically this is 120, but black has a policy of "1 or 2 over is fine if it is tidier", so we have to raise this.
max-line-length = 130
show_source = False
statistics = False

accept-encodings = utf-8
docstring-convention = numpy