Skip to content

Commit 95b4e51

Browse files
llucaxstefan-brus-frequenz
authored andcommitted
Add common tools (black, isort, pylint) options
This is to keep a consistent style across all projects. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent e6bb332 commit 95b4e51

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

pyproject.toml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,35 @@ Issues = "https://github.com/frequenz-floss/frequenz-api-dispatch/issues"
8787
Repository = "https://github.com/frequenz-floss/frequenz-api-dispatch"
8888
Support = "https://github.com/frequenz-floss/frequenz-api-dispatch/discussions/categories/support"
8989

90+
[tool.black]
91+
line-length = 88
92+
target-version = ['py311']
93+
94+
[tool.isort]
95+
profile = "black"
96+
line_length = 88
97+
src_paths = ["benchmarks", "examples", "src", "tests"]
98+
99+
[tool.pylint.similarities]
100+
ignore-comments = ['yes']
101+
ignore-docstrings = ['yes']
102+
ignore-imports = ['no']
103+
min-similarity-lines = 40
104+
105+
[tool.pylint.messages_control]
106+
disable = [
107+
"too-few-public-methods",
108+
# disabled because it conflicts with isort
109+
"wrong-import-order",
110+
"ungrouped-imports",
111+
# pylint's unsubscriptable check is buggy and is not needed because
112+
# it is a type-check, for which we already have mypy.
113+
"unsubscriptable-object",
114+
]
115+
116+
[tool.pytest.ini_options]
117+
testpaths = ["pytests"]
118+
90119
[tool.setuptools.package-dir]
91120
"" = "py"
92121

@@ -95,6 +124,3 @@ Support = "https://github.com/frequenz-floss/frequenz-api-dispatch/discussions/c
95124

96125
[tool.setuptools_scm]
97126
version_scheme = "post-release"
98-
99-
[tools.pytest.ini_options]
100-
testpaths = ["pytests"]

0 commit comments

Comments
 (0)