-
Notifications
You must be signed in to change notification settings - Fork 111
/
Copy pathpyproject.toml
104 lines (93 loc) · 2.96 KB
/
pyproject.toml
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# This file is centrally managed as a template file in https://github.com/canonical/solutions-engineering-automation
# To update the file:
# - Edit it in the canonical/solutions-engineering-automation repository.
# - Open a PR with the changes.
# - When the PR merges, the soleng-terraform bot will open a PR to the target repositories with the changes.
[tool.flake8]
max-line-length = 99
max-doc-length = 99
max-complexity = 10
exclude = [
".git",
"__pycache__",
".tox",
".build",
"build",
"dist",
".eggs",
"*.egg_info",
"venv",
".venv",
"report",
"docs",
"lib",
"mod",
"hooks/charmhelpers",
"tests/charmhelpers",
]
select = ["E", "W", "F", "C", "N", "R", "D", "H"]
# Ignore W503, E501 because using black creates errors with this
# Ignore D107 Missing docstring in __init__
# Ignore D415 Docstring first line punctuation (doesn't make sense for properties)
# Ignore N818 Exceptions end with "Error" (not all exceptions are errors)
# D100, D101, D102, D103: Ignore missing docstrings in tests
ignore = ["C901", "W503", "E501", "D107", "D415", "N818", "D100", "D101", "D102", "D103", "W504"]
per-file-ignores = ["tests/*:D100,D101,D102,D103,D104"]
# Check for properly formatted copyright header in each file
copyright-check = "True"
copyright-author = "Canonical Ltd."
copyright-regexp = "Copyright\\s\\d{4}([-,]\\d{4})*\\s+%(author)s"
[tool.black]
line-length = 99
exclude = '''
/(
| .eggs
| .git
| .tox
| .venv
| .build
| build
| lib
| report
| docs
| mod
| hooks/charmhelpers
| tests/charmhelpers
)/
'''
[tool.isort]
profile = "black"
line_length = 99
skip_glob = [".eggs", ".git", ".tox", ".venv", ".build", "build", "lib", "report", "mod", "hooks/charmhelpers", "tests/charmhelpers"]
[tool.pylint]
max-line-length = 99
disable = ["E1102"]
ignore = ['.eggs', '.git', '.tox', '.venv', '.build', 'lib', 'report', 'tests', 'docs', "mod", "hooks/charmhelpers", "tests/charmhelpers"]
[tool.mypy]
warn_unused_ignores = true
warn_unused_configs = true
warn_unreachable = true
disallow_untyped_defs = true
ignore_missing_imports = true
no_namespace_packages = true
exclude = ['.eggs', '.git', '.tox', '.venv', '.build', 'lib', 'report', 'tests', 'docs', "mod", "hooks/charmhelpers", "tests/charmhelpers"]
[tool.codespell]
skip = ".eggs,.tox,.git,.venv,venv,build,.build,lib,report,docs,poetry.lock,htmlcov,mod,hooks/charmhelpers,tests/charmhelpers"
quiet-level = 3
check-filenames = true
ignore-words-list = "assertIn"
## Ignore unsupported imports
[[tool.mypy.overrides]]
module = ["charmhelpers.*", "setuptools"]
ignore_missing_imports = true
[tool.coverage.run]
relative_files = true
source = ["."]
omit = ["tests/**", "docs/**", "lib/**", "snap/**", "build/**", "setup.py", "mod/**", "hooks/charmhelpers/**", "tests/charmhelpers/**"]
[tool.coverage.report]
fail_under = 100
show_missing = true
[tool.coverage.html]
directory = "tests/report/html"
[tool.coverage.xml]
output = "tests/report/coverage.xml"