summaryrefslogtreecommitdiff
path: root/.flake8
blob: 04ca460eeb9d3c03fc7d2a4741995718996597d8 (plain) (blame)
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
# -*- conf -*-
# flake8 settings for Spack core files.
#
# These exceptions are for Spack core files. We're slightly more lenient
# with packages.  See .flake8_packages for that.
#
# E1: Indentation
# - E129: visually indented line with same indent as next logical line
#
# E2: Whitespace
# - E221: multiple spaces before operator
# - E241: multiple spaces after ','
# - E272: multiple spaces before keyword
#
# E7: Statement
# - E731: do not assign a lambda expression, use a def
#
# W5: Line break warning
# - W503: line break before binary operator
# - W504: line break after binary operator
#
# These are required to get the package.py files to test clean:
# - F999: syntax error in doctest
#
# N8: PEP8-naming
# - N801: class names should use CapWords convention
# - N813: camelcase imported as lowercase
# - N814: camelcase imported as constant
#
[flake8]
ignore = E129,E221,E241,E272,E731,W503,W504,F999,N801,N813,N814
max-line-length = 79

# F4: Import
# - F405: `name` may be undefined, or undefined from star imports: `module`
#
# F8: Name
# - F821: undefined name `name`
#
per-file-ignores =
  var/spack/repos/*/package.py:F405,F821

# exclude things we usually do not want linting for.
# These still get linted when passed explicitly, as when spack flake8 passes
# them on the command line.
exclude =
  .git
  etc/
  opt/
  share/
  var/spack/cache/
  var/spack/gpg*/
  var/spack/junit-report/
  var/spack/mock-configs/
  lib/spack/external
  __pycache__
  var

format = spack

[flake8:local-plugins]
report =
  spack = flake8_formatter:SpackFormatter
paths =
  ./share/spack/qa/