-
-
Notifications
You must be signed in to change notification settings - Fork 384
/
pyproject.toml
238 lines (212 loc) · 6.25 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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
[project]
name = "pendulum"
version = "3.0.0"
description = "Python datetimes made easy"
readme = "README.rst"
requires-python = ">=3.9"
license = { text = "MIT License" }
authors = [{ name = "Sébastien Eustace", email = "[email protected]" }]
keywords = ['datetime', 'date', 'time']
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"python-dateutil>=2.6",
"tzdata>=2020.1",
'time-machine>=2.6.0; implementation_name != "pypy"',
]
[project.urls]
Homepage = "https://pendulum.eustace.io"
Documentation = "https://pendulum.eustace.io/docs"
Repository = "https://github.com/sdispater/pendulum"
[tool.poetry]
name = "pendulum"
version = "3.0.0"
description = "Python datetimes made easy"
authors = ["Sébastien Eustace <[email protected]>"]
license = "MIT"
readme = 'README.rst'
homepage = "https://pendulum.eustace.io"
repository = "https://github.com/sdispater/pendulum"
documentation = "https://pendulum.eustace.io/docs"
keywords = ['datetime', 'date', 'time']
[tool.poetry.dependencies]
python = ">=3.9"
python-dateutil = ">=2.6"
time-machine = { version = ">=2.16.0", markers = "implementation_name != 'pypy'", optional = true }
tzdata = ">=2020.1"
[tool.poetry.group.test.dependencies]
pytest = "^7.1.2"
pytz = ">=2022.1"
time-machine = ">=2.16.0"
pytest-benchmark = "^4.0.0"
[tool.poetry.group.doc.dependencies]
mkdocs = "^1.0"
pymdown-extensions = ">=6,<11"
pygments = "^2.2"
markdown-include = "^0.8.1"
[tool.poetry.group.lint.dependencies]
pre-commit = "^3.0.0"
[tool.poetry.group.typing.dependencies]
mypy = "^1.3.0"
types-python-dateutil = "^2.8.19"
types-pytz = ">=2022.7.1.2"
[tool.poetry.group.dev.dependencies]
babel = "^2.10.3"
cleo = { version = "^2.0.1", python = ">=3.8,<4.0" }
tox = "^4.0.0"
[tool.poetry.group.benchmark.dependencies]
pytest-codspeed = "^3.0.0"
[tool.poetry.group.build.dependencies]
maturin = ">=1.0,<2.0"
[tool.poetry.extras]
test = ["time-machine"]
[tool.maturin]
module-name = "pendulum._pendulum"
[tool.ruff]
fix = true
unfixable = [
"ERA", # do not autoremove commented out code
]
target-version = "py39"
line-length = 88
extend-select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"ERA", # flake8-eradicate/eradicate
"I", # isort
"N", # pep8-naming
"PIE", # flake8-pie
"PGH", # pygrep
"RUF", # ruff checks
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"UP", # pyupgrade
]
ignore = [
"B904", # use 'raise ... from err'
"B905", # use explicit 'strict=' parameter with 'zip()'
"N818", # Exception name should be named with an Error suffix
"RUF001",
]
extend-exclude = [
# External to the project's coding standards:
"docs/*",
# Machine-generated, too many false-positives
"src/pendulum/locales/*",
# ruff disagrees with black when it comes to formatting
"*.pyi",
]
[tool.ruff.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.isort]
force-single-line = true
lines-between-types = 1
lines-after-imports = 2
known-first-party = ["pendulum"]
known-third-party = [
"babel",
"cleo",
"dateutil",
"time_machine",
"pytzdata",
]
required-imports = ["from __future__ import annotations"]
[tool.ruff.extend-per-file-ignores]
"build.py" = ["I002"]
"clock" = ["RUF012"]
[tool.mypy]
strict = true
files = "src, tests"
show_error_codes = true
pretty = true
warn_unused_ignores = true
exclude = [
"^build\\.py$"
]
# The following whitelist is used to allow for incremental adoption
# of Mypy. Modules should be removed from this whitelist as and when
# their respective type errors have been addressed. No new modules
# should be added to this whitelist.
[[tool.mypy.overrides]]
module = [
"pendulum.mixins.default",
"tests.test_parsing",
"tests.date.test_add",
"tests.date.test_behavior",
"tests.date.test_construct",
"tests.date.test_comparison",
"tests.date.test_day_of_week_modifiers",
"tests.date.test_diff",
"tests.date.test_fluent_setters",
"tests.date.test_getters",
"tests.date.test_start_end_of",
"tests.date.test_strings",
"tests.date.test_sub",
"tests.datetime.test_add",
"tests.datetime.test_behavior",
"tests.datetime.test_construct",
"tests.datetime.test_comparison",
"tests.datetime.test_create_from_timestamp",
"tests.datetime.test_day_of_week_modifiers",
"tests.datetime.test_diff",
"tests.datetime.test_fluent_setters",
"tests.datetime.test_from_format",
"tests.datetime.test_getters",
"tests.datetime.test_naive",
"tests.datetime.test_replace",
"tests.datetime.test_start_end_of",
"tests.datetime.test_strings",
"tests.datetime.test_sub",
"tests.datetime.test_timezone",
"tests.duration.test_add_sub",
"tests.duration.test_arithmetic",
"tests.duration.test_behavior",
"tests.duration.test_construct",
"tests.duration.test_in_methods",
"tests.duration.test_in_words",
"tests.duration.test_total_methods",
"tests.formatting.test_formatter",
"tests.helpers.test_local_time",
"tests.localization.*",
"tests.parsing.test_parsing",
"tests.parsing.test_parsing_duration",
"tests.parsing.test_parse_iso8601",
"tests.interval.test_add_subtract",
"tests.interval.test_arithmetic",
"tests.interval.test_behavior",
"tests.interval.test_construct",
"tests.interval.test_hashing",
"tests.interval.test_in_words",
"tests.interval.test_range",
"tests.time.test_add",
"tests.time.test_behavior",
"tests.time.test_comparison",
"tests.time.test_construct",
"tests.time.test_diff",
"tests.time.test_fluent_setters",
"tests.time.test_strings",
"tests.time.test_sub",
"tests.tz.test_helpers",
"tests.tz.test_local_timezone",
"tests.tz.test_timezone",
"tests.tz.test_timezones",
]
ignore_errors = true
[tool.coverage.run]
omit = [
"pendulum/locales/*",
"pendulum/__version__.py,",
"pendulum/_extensions/*",
"pendulum/parsing/iso8601.py",
"pendulum/utils/_compat.py",
]
[build-system]
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"