-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
95 lines (83 loc) · 2.68 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
[tool.poetry]
authors = ["Sandro Huber <[email protected]>"]
classifiers = ["Development Status :: 4 - Beta"]
description = "A Python license checker"
homepage = "https://github.com/ubersan/pylic"
keywords = ["cli", "license", "checker"]
license = "MIT License"
name = "pylic"
readme = "README.md"
repository = "https://github.com/ubersan/pylic"
version = "4.0.0"
[tool.poetry.dependencies]
python = "^3.8"
toml = "^0.10.2"
[tool.poetry.group.dev.dependencies]
mypy = "^0.991"
pytest = "^7.2.0"
pytest-cov = "^4.0.0"
pytest-mock = "^3.10.0"
taskipy = "^1.10.3"
types-toml = "^0.10.8.1"
ruff = "^0.4.2"
pytest-only = "^2.1.1"
[tool.poetry.scripts]
pylic = 'pylic.cli.app:main'
[tool.taskipy.tasks]
check-format = "echo 'Checking formatting ...' && ruff format --diff --quiet ."
fix-format = "echo 'Fixing formatting ...' && ruff format ."
check-lint = "echo 'Checking linting ...' && ruff check --quiet ."
fix-lint = "echo 'Fixing linting ...' && ruff check --fix ."
check-types = "echo 'Checking types ...' && mypy --pretty --no-error-summary ."
check-licenses = "echo 'Checking licenses ...' && python -m pylic check --quiet"
check-all = "task check-format && task check-lint && task check-types && task check-licenses && echo ✅"
fix-all = "task fix-format ; task fix-lint"
get-current-version = "echo -n v$(sed '11q;d' pyproject.toml | awk '{print $3}' | tail -c +2 | head -c -2)"
release = " git tag $(task get-current-version) && git push origin $(task get-current-version)"
test = "pytest --cov=./ --cov-report=xml"
[tool.pylic]
safe_licenses = [
"BSD License",
"Apache Software License",
"MIT License",
"Python Software Foundation License"
]
[tool.ruff]
line-length = 140
[tool.ruff.format]
skip-magic-trailing-comma = true
[tool.ruff.lint]
select = ["E", "F", "UP", "B", "SIM", "I"]
[tool.ruff.lint.isort]
split-on-trailing-comma = false
[tool.coverage.report]
exclude_lines = [
"if __name__ == .__main__.:",
"from importlib_metadata import Distribution, distributions", # tested by integration tests
"app.run()", # tested by integration tests
"pragma: no cover",
]
[tool.mypy]
check_untyped_defs = true
disallow_any_unimported = false
disallow_incomplete_defs = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
explicit_package_bases = true
files = ["pylic", "tests"]
namespace_packages = true
no_implicit_optional = true
pretty = true
show_column_numbers = true
show_error_codes = true
show_error_context = true
warn_no_return = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core>=1.0.0"]