forked from mypaint/mypaint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.cfg
80 lines (70 loc) · 2.34 KB
/
setup.cfg
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# MyPaint uses a custom installation scheme.
#
# The $base below will be replaced by the value of --prefix,
# or your system's default prefix if you don't pass that arg to setup.py
#
# Use --root in addition to --prefix if you're making a package.
[install]
verbose=1
install_scripts=$base/bin
install_platlib=$base/lib/mypaint
install_purelib=$base/lib/mypaint
install_data=$base/share
install_headers=$base/include
[nosetests]
with-doctest=1
verbosity=2
# Syntax checking:
[flake8]
max-line-length = 120
extend-select = B950,I001
ignore = E203,E266,E501,E701,W503,E251,E226,BLK100
exclude =
.git,
__pycache__,
docs,
build,
dist,
out,
svg,
pixmaps,
backgrounds,
desktop,
tests,
glade,
flatpak,
appimage,
palettes,
lib/mypaintlib.py,
po
max-complexity = 20
[pep8]
ignore = E266,W503,E251,E226
# We don't ignore PEP8 warnings without a good reason,
# or at least a documented snivelling excuse.
# Let's aim for this section to shrink now.
# E266 "too many leading '#' for block comment"
# Excuse: Andrew uses ^\s*## for folding Python code in Vim.
# W503 "line break before binary operator"
# Reason: we do this because the underlying PEP-8 advice is
# actively harmful to code readability.
# Ref: http://rhodesmill.org/brandon/slides/2012-11-pyconca/
# House style: we suggest you break formulae before binary operators.
# E251 "unexpected spaces around keyword / parameter equals"
# Reason: bound variable assignments like these
# are easier to read with spaces around the "=",
# when a function call is split over multiple lines.
# MyPaint's codebase uses a lot of GObject/PyGI calls,
# which have notoriously long function and method names.
# PyGI now deprecates many non-keyword assignments too.
# The only pretty way of dealing with this
# is to split calls over multiple lines.
# House style: spaces areound equals signs are allowed,
# but only this style for calls to things. Never function defs.
# E226 "missing whitespace around arithmetic operator"
# Reason: being able to see the wood for the trees.
# This has been our house style for way too long
# for it to be fixed on a first pass for the very mathematically
# involved modules.
# It doesn't add *that* much to readability, either (IMO).
# Maybe once everything else is compliant, we'll look at this again.