-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.cfg
61 lines (56 loc) · 2.73 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
[bdist_wheel]
# Always build universal wheel
universal = 1
[flake8]
# Explanation of errors and reasons for disabling them
# Format: ERR: Description - Explanation for disabling.
#
# E501: line too long - I just want to keep line lengths within reason.
# E251: unexpected spaces around keyword / parameter equals - I really like spaces around the parameters. I think it's easier to read.
# E265: block comment should start with '# ' - Commented out code does not have a space by convention. Comments do.
# E302: expected 2 blank lines, found 1 - This doesn't seem necessary to me. One blank line seems fine.
# W391: blank line at end of file - I prefer a blank line at the end of the file.
# E305: expected 2 blank lines after class or function definition, found X - One space afterwards looks fine to me.
# E266: too many leading '#' for block comment - Sometimes I prefer comment blocks to stand out, so I use multiple #.
# W503: line break before binary operator - I prefer a line break before the binary operator (as opposed to the opposite).
ignore = E501, E251, E265, E302, W391, E305, E266, W503
exclude = .git, .env, .env3, .py3.7, .jet_hadron, __pycache__, bak, build, dist, mem_cache
max-line-length = 120
max-complexity = 10
# NOTE: The format for flake8 output is set in the `.flake8` file. This is separate because `setup.cfg` is
# parsed on setup, but it would require flake8-colors to run successfully (which will only be
# available after install). So we define it in `.flake8`, and it seems to successfully combine the
# settings in the two files together.
[tool:isort]
known_standard_library = setuptools
known_third_party = IPython,ROOT,coloredlogs,cycler,enlighten,iminuit,matplotlib,mpl_toolkits,numpy,pyjet,pytest,requests,ruamel,scipy,seaborn
line_length = 120
# Meaning a grouped grid of imports
multi_line_output = 5
lines_after_imports = 1
verbose = true
skip = setup.py, docs/conf.py
skip_glob = .*
[tool:pytest]
# Ignore deprecation warnings about `factorial` in scipy that are generated by numdifftools
# See: https://docs.pytest.org/en/latest/warnings.html#deprecationwarning-and-pendingdeprecationwarning
filterwarnings =
ignore:`factorial` is deprecated:DeprecationWarning
[coverage:run]
source = jet_hadron
[mypy]
ignore_missing_imports = True
# Equivalent to strict as of mypy 0.7. They apparently don't want to add it to the config.
# See: https://github.com/python/mypy/issues/2929
warn_unused_configs = True
disallow_subclassing_any = True
disallow_any_generics = True
disallow_untyped_calls = True
disallow_untyped_defs = True
disallow_incomplete_defs = True
check_untyped_defs = True
disallow_untyped_decorators = True
no_implicit_optional = True
warn_redundant_casts = True
warn_unused_ignores = True
warn_return_any = True