Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
130 lines (123 loc) · 4.06 KB
/
Copy pathpyproject.toml
File metadata and controls
130 lines (123 loc) · 4.06 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
[build-system]
build-backend = "hatchling.build"
requires = [
"hatch-vcs",
"hatchling>=1.27",
]
[project]
name = "humanize"
description = "Python humanize utilities"
readme = "README.md"
keywords = [
"humanize time size",
]
license = "MIT"
license-files = [ "LICENCE" ]
maintainers = [ { name = "Hugo van Kemenade" } ]
authors = [ { name = "Jason Moiron", email = "jmoiron@jmoiron.net" } ]
requires-python = ">=3.11"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Programming Language :: Python :: 3.16",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Text Processing",
"Topic :: Text Processing :: General",
]
dynamic = [ "version" ]
optional-dependencies.tests = [
"freezegun",
"pytest>=9",
"pytest-benchmark",
"pytest-codspeed",
"pytest-cov",
]
urls."Issue tracker" = "https://github.com/python-humanize/humanize/issues"
urls."Release notes" = "https://github.com/python-humanize/humanize/releases"
urls.Documentation = "https://humanize.readthedocs.io/"
urls.Funding = "https://tidelift.com/subscription/pkg/pypi-humanize?utm_source=pypi-humanize&utm_medium=pypi"
urls.Homepage = "https://github.com/python-humanize/humanize"
urls.Source = "https://github.com/python-humanize/humanize"
[tool.hatch]
version.source = "vcs"
version.raw-options.local_scheme = "no-local-version"
build.artifacts = [ "*.mo" ]
build.hooks.vcs.version-file = "src/humanize/_version.py"
[tool.ruff]
fix = true
lint.extend-select = [
"C4", # flake8-comprehensions
"D", # pydocstyle
"E", # pycodestyle errors
"EM", # flake8-errmsg
"F", # pyflakes
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"PERF", # perflint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PT", # flake8-pytest-style
"PYI", # flake8-pyi
"RUF022", # unsorted-dunder-all
"RUF046", # unnecessary-cast-to-int
"RUF100", # unused noqa (yesqa)
"TID251", # flake8-tidy-imports: banned-api
"UP", # pyupgrade
"W", # pycodestyle warnings
"YTT", # flake8-2020
]
lint.ignore = [
"E203", # Whitespace before ':'
"E221", # Multiple spaces before operator
"E226", # Missing whitespace around arithmetic operator
"E241", # Multiple spaces after ','
"PIE790", # flake8-pie: unnecessary-placeholder
]
lint.per-file-ignores."tests/*" = [
"D",
"DTZ", # naive local datetimes are intentional
]
lint.flake8-import-conventions.aliases.datetime = "dt"
lint.flake8-import-conventions.banned-from = [ "datetime" ]
lint.flake8-pytest-style.parametrize-names-type = "csv"
lint.flake8-tidy-imports.banned-api."re.match".msg = "use re.fullmatch() or re.search() instead"
lint.flake8-tidy-imports.banned-api."typing.TYPE_CHECKING".msg = "use TYPE_CHECKING = False instead"
lint.isort.known-first-party = [ "humanize" ]
lint.isort.required-imports = [ "from __future__ import annotations" ]
lint.pydocstyle.convention = "google"
lint.future-annotations = true
[tool.pyproject-fmt]
max_supported_python = "3.16"
[tool.mypy]
strict = true
pretty = true
num_workers = 4
show_error_codes = true
[tool.pytest]
addopts = [ "--doctest-modules" ]
filterwarnings = [
"error",
# pytest-codspeed 5.0.4 supports up to 3.15
"ignore:Python 3.16 is not officially supported by pytest-codspeed:RuntimeWarning",
]
minversion = "9.0"
testpaths = [ "src", "tests" ]
[tool.coverage]
run.disable_warnings = [ "no-sysmon" ] # 3.11
run.core = "sysmon" # default for 3.14+, available for 3.12+
# Regexes for lines to exclude from consideration
report.exclude_also = [
# Don't complain if non-runnable code isn't run:
"if __name__ == .__main__.:",
]