-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
159 lines (131 loc) · 4.94 KB
/
pyproject.toml
File metadata and controls
159 lines (131 loc) · 4.94 KB
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
[build-system]
requires = ["setuptools >= 77.0.3"]
build-backend = "setuptools.build_meta"
[project]
name = "caldav2ics"
dynamic = ["version"]
dependencies = ["caldav", "icalendar", "msgspec[toml]", "typing-extensions"]
requires-python = ">=3.9"
authors = [{ name = "Tim Hörmann", email = "pypi@audivir.de" }]
description = "Cache CalDAV calendars in static .ICS files."
readme = "README.md"
license = "MIT"
license-files = ["LICENSE"]
classifiers = ["Programming Language :: Python :: 3"]
[project.urls]
Homepage = "https://github.com/audivir/caldav2ics"
Repository = "https://github.com/audivir/caldav2ics"
[project.optional-dependencies]
dev = ["ruff", "mypy", "pytest", "coverage[toml]", "vulture"]
[project.scripts]
caldav2ics = "caldav2ics:cli"
[tool.setuptools]
dynamic = { version = { attr = "caldav2ics.__version__" } }
[tool.mypy]
python_version = "3.9"
strict = true
disable_error_code = "import-untyped"
enable_error_code = """type-arg,no-untyped-def,redundant-cast,redundant-self,comparison-overlap,
no-untyped-call,no-any-return,no-any-unimported,unreachable,deprecated,redundant-expr,
possibly-undefined,truthy-bool,truthy-iterable,ignore-without-code,
unused-awaitable,unused-ignore,explicit-override,unimported-reveal,mutable-override,unimported-reveal,explicit-any"""
# untyped definitions and calls
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
# configuring warnings
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_return_any = true
warn_unreachable = true
exclude = ["build", "docs"]
[tool.coverage.run]
source = ["tests", "caldav2ics"]
command_line = "-m pytest"
branch = true
[tool.coverage.report]
omit = ["_types.py"]
exclude_also = ["if TYPE_CHECKING:", 'if __name__ == "__main__":']
fail_under = 100
show_missing = true
[tool.pytest.ini_options]
minversion = "8.0"
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
xfail_strict = true
log_cli_level = "INFO"
filterwarnings = [
"error",
"ignore::pytest.PytestCacheWarning",
"ignore::DeprecationWarning",
]
testpaths = ["tests"]
[tool.vulture]
ignore_names = ["_*", "unused_*"]
paths = ["tests", ".whitelist", "caldav2ics.py"]
make_whitelist = true
sort_by_size = true
verbose = false
[tool.ruff]
fix = true
show-fixes = true
exclude = [".git", ".idea", ".mypy_cache", ".tox", ".venv", ".nox"]
target-version = "py39"
line-length = 100
indent-width = 4
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = true
[tool.ruff.lint]
dummy-variable-rgx = "^(dummy_.*|unused_.*|_)$"
select = ["ALL"]
fixable = ["ALL"]
ignore = [
"ISC001", # implicit-str-concat
"COM812", # missing-trailing-comma
# ALLOW PICKLE USE
"S301", # `pickle` and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue
# IGNORE TODO
# "TD002", # Missing author in TODO; try: `# TODO(<author_name>): ...` or `# TODO @<author_name>: ...`
"TD003", # Missing issue link on the line following this TODO
"FIX002", # Line contains TODO, consider resolving the issue
"FBT001", # Boolean-typed positional argument in function definition
"FBT002", # Boolean default positional argument
"FBT003", # Boolean positional value in function call
# "T201", # `print` found
"NPY002", # Replace legacy `np.random.permutation` call with `np.random.Generator.permutation`
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in `**kwargs`
# EXCEPTIONS
"EM101", # Exception must not use a string literal, assign to variable first
"EM102", # Exception must not use an f-string literal, assign to variable first
"TRY003", # Avoid specifying long messages outside the exception class
"TRY300", # Use of else blocks in try/except
# DOCSTRINGS
#"D102", # Missing docstring in public method
#"D103", # Missing docstring in public function
"D105", # Missing docstring in magic method
# "D107", # Missing docstring in `__init__`
#"D415", # First line should end with a period, question mark, or exclamation point
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.pylint]
max-args = 10
[tool.ruff.lint.isort]
required-imports = ["from __future__ import annotations"]
split-on-trailing-comma = false
[tool.ruff.lint.per-file-ignores]
# Stub files for C extensions are allowed to have docstrings and overwrite __doc__, __version__, etc.
"_*.pyi" = ["PYI021", "A"]
# conf.py automatically created by Sphinx
"docs/conf.py" = ["INP001", "D100", "ERA001", "A"]
"noxfile.py" = ["INP001"]
# Test files do not need to have docstrings at each test function
# S101: assert, PLR2004: magic value comparison, T20: print statements
"**/test_*.py" = ["INP001", "PLR2004", "S101", "D101", "D102", "D103", "T20"]
"tests/**" = ["INP001", "PLR2004", "S101", "D101", "D102", "D103", "T20"]