-
Notifications
You must be signed in to change notification settings - Fork 6
/
pyproject.toml
112 lines (99 loc) · 3.38 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
105
106
107
108
109
110
111
112
[tool.poetry]
name = "toggl_python"
version = "0.3.1"
description = "Typed `Toggl API` Python wrapper with pre-validation to avoid extra network usage."
authors = ["Evrone <mail@evrone.com>"]
maintainers = ["Nifadev Vadim <vnifadev@evrone.com>"]
readme = "README.md"
homepage = "https://github.com/evrone/toggl_python"
repository = "https://github.com/evrone/toggl_python"
documentation = "https://toggl-python.readthedocs.io"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Typing :: Typed",
]
[project]
name = "toggl_python"
requires-python = ">=3.8"
[tool.poetry.dependencies]
python = "^3.8.18"
httpx = {extras = ["http2"], version = "^0.27.2"}
# Necessary for listing available timezones
# use zoneinfo.available_timezones()
backports-zoneinfo = {version = "^0.2.1", python = "3.8"}
pydantic = {extras = ["email"], version = "^2.9.2"}
[tool.poetry.group.dev.dependencies]
pytest = "^8.3.3"
nox = "^2024.4.15"
respx = "^0.21.1"
ruff = "^0.5.7"
pre-commit = "3.5.0"
faker = "^28.4.1"
pytest-cov = "^5.0.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
src = ["toggl_python"]
line-length = 99
unsafe-fixes = true
extend-exclude = [
"docs/*",
".venv",
"venv",
]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"COM812", # Trailing comma missing
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D106", # Missing docstring in public nested class
"D107", # Missing docstring in __init__
"UP006", # Use `list` instead of `List` for type annotation
"UP007", # Use `X | Y` for type annotations (not supported on current Python version - 3.8)
# Ignored because function args emulates query args which could be boolean
"FBT001", # Boolean-typed positional argument in function definition
"FBT002", # Boolean default positional argument in function definition
"N818", # Exception name should be named with Error suffix
"PT004", # Deprecated error, will be removed in future release
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"S101",
"S106", # Possible hardcoded password assigned to argument
]
# Move standard/third-party library import into a type-checking block
# Necessary for valid Pydantic schemas
"toggl_python/schemas/*" = ["TCH002", "TCH003"]
[tool.ruff.lint.isort]
lines-after-imports = 2
[tool.ruff.lint.pylint]
max-args = 12
max-public-methods = 10
max-locals = 16
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.pytest.ini_options]
markers = [
"integration: make API calls during testing (deselect with '-m \"not integration\"')",
]
addopts = "--cov=toggl_python --cov-fail-under=95"