-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathpyproject.toml
85 lines (74 loc) · 2.42 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
[tool.poetry]
name = "py2puml"
version = "0.9.1"
description = "Generate PlantUML class diagrams to document your Python application."
keywords = ["class diagram", "PlantUML", "documentation", "inspection", "AST"]
readme = "README.md"
repository = "https://github.com/lucsorel/py2puml"
authors = ["Luc Sorel-Giffo"]
maintainers = ["Luc Sorel-Giffo"]
license = "MIT"
include = [
"CONTRIBUTING.md"
]
[tool.poetry.scripts]
py2puml = 'py2puml.cli:run'
[tool.poetry.dependencies]
python = "^3.8"
[tool.poetry.group.dev.dependencies]
pytest = "^7.2.1"
pytest-cov = "^4.0.0"
[tool.poetry.group.lint.dependencies]
pre-commit = "^3.3.3"
[tool.pytest.ini_options]
console_output_style = "count"
[tool.isort]
py_version=38
# maintain consistency with other quality tools
line_length = 120
# consistency with ruff-format: mode 3
# from third_party import (
# lib1,
# lib2,
# [...]
# libn,
# )
multi_line_output = 3
include_trailing_comma = true
# TESTS->known_tests: create a specific section for imports of tests modules
# (this is the reason why isort is still used alongside ruff-format)
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER", "TESTS"]
known_tests = ["tests"]
[tool.ruff]
target-version = "py38"
# maintain consistency with other quality tools
line-length = 120
# activated families of verifications (https://beta.ruff.rs/docs/rules/
select = ["B", "E", "F", "W", "N", "SIM", "C4"]
# do not check:
# - E501 line lengths: ruff formatter already handles them
# - B905 zip(*, strict=True): strict was introduced in Python 3.10+
extend-ignore = ["E501", "B905"]
# automatically fixes when possible
fix = true
[tool.ruff.per-file-ignores]
# do not check unused imports in __init__.py files (they expose module features)
"__init__.py" = ["E402"]
# visiting function names include uppercase words (visit_FunctionDef)
"py2puml/parsing/astvisitors.py" = ["N802"]
"tests/asserts/variable.py" = ["N802"]
"tests/py2puml/parsing/test_astvisitors.py" = ["N802", "N805"]
"tests/py2puml/parsing/test_compoundtypesplitter.py" = ["N802"]
"tests/py2puml/parsing/test_moduleresolver.py" = ["N802"]
"tests/__init__.py" = ["B023"]
# test classes with underscore in their names
"tests/modules/withuniontypes.py" = ['N801']
[tool.ruff.format]
indent-style = "space"
line-ending = "lf"
quote-style = "single"
[tool.ruff.lint.isort]
forced-separate = ["tests"]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"