[flake8]
# E501 is the "Line too long" error. We disable it because we use Black for
# code formatting. Black makes a best effort to keep lines under the max
# length, but can go over in some cases.
# W503 goes against PEP8 rules. It's disabled by default, but must be disabled
# explicitly when using `ignore`.
ignore = E501, W503
per-file-ignores =
    */__init__.py: E402, F401
    # we test various import patterns
    tests/test_exports.py: IMP100, IMP101, IMP102
    tests/*: IMP101, IMP102, IMP102
    # backcompat with outdated import patterns
    stripe/api_resources/*: IMP100, E402, F401

    # IMP101: Do not import stripe
    # breaking circular dependencies in overrides
    stripe/tax/_form.py: IMP101
    stripe/_file.py: IMP101
    stripe/_account.py: IMP101
    stripe/_person.py: IMP101
    stripe/_quote.py: IMP101

    # IMP102: Do not create public modules
    # contains a single deprecated class
    stripe/api_resources/recipient_transfer.py: IMP102
    # type names conflict with existing error names in stripe
    stripe/oauth_error.py: IMP102
    # setup.py is required for tooling
    setup.py: IMP102

[flake8:local-plugins]
extension =
    SPY = flake8_stripe:TypingImportsChecker
    IMP = flake8_stripe:StripeImportsChecker
paths=./flake8_stripe
