forked from morganzero/cloudflare-companion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
169 lines (149 loc) · 3.22 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
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
160
161
162
163
164
165
166
167
168
169
[project]
name = "dns-synchub"
description = """
This will build a Docker image to automatically update CloudFlare DNS
records upon container start when using Traefik as a Reverse Proxy
"""
authors = [
{ name = "Carlos Martín", email = "[email protected]" },
]
license = "MIT"
readme = "README.md"
version = "0.1.0"
dependencies = [
"cloudflare <= 2.20",
"docker>=7.1.0",
"pydantic >= 2.0",
"pydantic-settings @ git+https://github.com/inean/[email protected]",
"python-dotenv>=1.0.1",
"requests>=2.26.0",
"tenacity>=9.0.0",
"typing-extensions>= 4.5.0",
]
requires-python = ">= 3.11"
[project.optional-dependencies]
[project.urls]
Homepage = "https://github.com/inean/dns-synchub"
Source = "https://github.com/inean/dns-synchub"
Changelog = "https://github.com/inean/dns-synchub/blob/main/CHANGELOG.md"
[project.scripts]
dns-synchub = "dns_synchub:main"
[tool.uv]
dev-dependencies = [
# lint
"mypy>=1.11.2",
"pre-commit>=3.7.1",
"pyupgrade>=3.16.0",
"ruff>=0.5.4",
"deptry>=0.20.0",
# test
"pytest-asyncio>=0.23.8",
"pytest-cov>=5.0.0",
"pytest-mock >=3.14.0",
"pytest>=8.3.2",
"pytest-pretty",
# Type stubs
"types-docker>=7.1.0.20240827",
]
[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "function"
markers = [
"skip_fixture(name): Skip the test if the specified mark is present",
]
testpaths = "tests"
pythonpath = [
"src",
]
filterwarnings = [
"error",
]
[tool.coverage.run]
branch = true
source = [
'dns_synchub',
]
context = '${CONTEXT}'
[tool.coverage.report]
precision = 2
exclude_lines = [
'pragma: no cover',
'raise NotImplementedError',
'raise NotImplemented',
'if TYPE_CHECKING:',
'@overload',
]
[tool.coverage.paths]
source = [
'src/dns_synchub/',
]
[tool.ruff]
# set max-line-length to 100
line-length = 100
# Enable preview features.
preview = true
[tool.ruff.format]
# format code inside docstrings
docstring-code-format = true
# Prefer single quotes over double quotes.
quote-style = 'single'
# Enable preview style formatting.
preview = true
[tool.ruff.lint]
# On top of the default `select` (`E4`, E7`, `E9`, and `F`),
extend-select = [
# code complexity rules
'C90',
# isort rules
'I',
#
'RUF100',
]
extend-fixable = [
# line too-long rule
'E501',
# isort rules
'I',
# flake8-bugbear rules
'B',
# flake8-quotes rules
'Q',
'RUF100',
# pydocstyle rules
'D',
# pyupgrade rules
'UP',
]
[tool.ruff.lint.isort]
force-sort-within-sections = true
known-first-party = [
'src',
]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.flake8-quotes]
inline-quotes = 'single'
multiline-quotes = 'double'
[tool.ruff.lint.pycodestyle]
max-line-length = 120
[tool.ruff.lint.pydocstyle]
convention = 'google'
[tool.ruff.lint.pyupgrade]
keep-runtime-typing = true
[tool.deptry]
root = 'src/dns_synchub'
[tool.mypy]
strict = true
files = [
"src/",
"tests/",
]
# Third party type stubs
mypy_path = "types"
#Don't prevents discovery of packages that don’t have an __init__.py
namespace_packages = true
[[tool.mypy.overrides]]
module = [
'dotenv.*',
]
#Silently ignore imports of missing modules
ignore_missing_imports = true