generated from caltechlibrary/py-cli-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.flake8
51 lines (49 loc) · 2.09 KB
/
.flake8
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
46
47
48
49
50
51
# Summary: project-wide Flake8 configuration. -*- conf-toml -*-
#
# Note: as of version 4.0, flake8 does NOT read global configuration files
# from ~/.flake8 or ~/.config/flake8. If you had such a config file of your
# own, and you're looking at this config file and wondering how the two will
# interaction, the answer is simple: they won't. Only this file matters.
#
# The following flake8 plugins are assumed to be installed:
# flake8-bugbear
# flake8-builtins
# flake8-comprehensions
# flake8-executable
# flake8-implicit-str-concat
# flake8-pie
# flake8_simplify
#
# Copyright 2024 California Institute of Technology.
# License: Modified BSD 3-clause – see file "LICENSE" in the project website.
# Website: https://github.com/caltechlibrary/iga
[flake8]
ignore =
# We try to stick to 80 chars but don't want to be hung up on it.
E501,
# We prefer two lines between methods of a class.
E303,
# Sometimes we want to align keywords, and these rules run counter to it.
E271,
E221,
# Sometimes it's more readable to omit spaces around operators and colons.
E203,
E226,
# E402 = "module level import not at top of file". However, for responsive
# scripts, you want to use lazy imports (meaning, import things when you
# need them and not at the top of the file), which violates this rule.
E402,
# According to Flake8 docs at https://www.flake8rules.com/rules/W503.html
# line breaks *should* come before a binary operator, but as of version 4,
# Flake8 still flags the breaks as bad. So:
W503
per-file-ignores =
# The @plac line in __main__.py is more readable if you align the equals
# signs, which runs counter to E251 ("unexpected spaces around
# keyword/parameter equals"). It would be better to disable E251 just for
# that block in the file, BUT flake8 only recognizes per-line annotations,
# so there's no way to tell it to ignore a rule only for a block of code.
iga/__init__.py: E221
iga/__main__.py: E251
tests/*: F403, W391, E202, E251
vendor:*: A003, E301, E302, E305, W291, W293, W605, F821