[flake8]
ignore =
    # E117: over-indented
    # mostly a consequence of W504 issues
    E117,
    # E124: closing bracket does not match visual indentation
    # mostly wrongly indented closing bracket
    E124,
    # E125: continuation line with same indent as next logical line
    # wrong indentation of continuation lines
    E125,
    # E501: line too long (* > 300 characters)
    # triggered by very long text string in tests
    E501,
    # E731: do not assign a lambda expression, use a def
    E731,
    # W504: line break after binary operator
    # we break after binary operators, newer style breaks before
    W504,
per-file-ignores =
    # cpinfo fake data as unindented """...""" block
    test/test_utils.py: E122
    # we need to mock some modules before importing additional files
    test/test_repolib.py: E402
    test/certdata.py:
        # trailing whitespace in test data
        W291
        # wrong way to do a continuation line, however it is for test data
        E122
    # cannot import the cockpit modules
    integration-tests/packagelib.py: F40
exclude =
    # cockpit bits downloaded during the cockpit CI run
    bots/,
    cockpit/,
    # old scripts, possibly no more useful, ignore them for now
    scripts/,
max-line-length = 300
