forked from stripe/stripe-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.flake8
More file actions
45 lines (42 loc) · 1.68 KB
/
.flake8
File metadata and controls
45 lines (42 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
[flake8]
extend-ignore =
# E501 is the "Line too long" error. We disable it because we use Ruff for
# code formatting. Ruff makes a best effort to keep lines under the max
# length, but can go over in some cases.
E501,
# E203 checks that `:` is not preceded by whitespace, but in some cases,
# formatting adds the whitespace. We let formatting be the source of truth in that case.
E203,
# flake8 runs all installed rules, but we only want a single B (see below) so we disable the rest
B
extend-select =
B006 # forbid mutable default args
per-file-ignores =
*/__init__.py: IMP100, E402, F401
# we test various import patterns
tests/test_exports.py: IMP100, IMP101, IMP102, F401
tests/*: IMP101, IMP102, BAN100, ASY100
# backcompat with outdated import patterns
stripe/api_resources/*: IMP100, E402, F401
# IMP101: Do not import stripe
# breaking circular dependencies in overrides
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
# should not raise a deprecation warning since it needs
# to be imported early in `stripe/__init__.py` to avoid
# a name conflict
stripe/app_info.py: IMP102
[flake8:local-plugins]
extension =
SPY = flake8_stripe:TypingImportsChecker
IMP = flake8_stripe:StripeImportsChecker
BAN = flake8_stripe:BanPublicMethodsChecker
ASY = flake8_stripe:AsyncNamingConventions
paths=./flake8_stripe