@@ -9,13 +9,12 @@ license = {text = "MIT"}
99readme = " README.md"
1010classifiers = [
1111 " Development Status :: 5 - Production/Stable" ,
12- " Programming Language :: Python :: 3.8" ,
1312 " Programming Language :: Python :: 3.9" ,
1413 " Programming Language :: Python :: 3.10" ,
1514 " Programming Language :: Python :: 3.11" ,
1615 " Programming Language :: Python :: 3.12" ,
1716]
18- requires-python = " >=3.8 "
17+ requires-python = " >=3.9 "
1918dependencies = []
2019
2120[tool .hatch .version ]
@@ -58,21 +57,15 @@ run-xdoctest = [ "hatch run xdoctest:run" ]
5857run-docs-build = [ " hatch run docs-build:run" ]
5958
6059[[tool .hatch .envs .sessions .matrix ]]
61- python = [" 3.8 " , " 3. 9" , " 3.10" , " 3.11" , " 3.12" ]
60+ python = [" 3.9" , " 3.10" , " 3.11" , " 3.12" ]
6261
6362[tool .hatch .envs .pre-commit ]
6463dependencies = [
65- " bandit" ,
66- " black" ,
67- " flake8" ,
68- " flake8-bugbear == 22.*" ,
69- " flake8-docstrings" ,
70- " isort" ,
71- " pep8-naming" ,
64+ " ruff" ,
7265 " pre-commit" ,
7366 " pre-commit-hooks" ,
74- " pyupgrade" ,
7567]
68+
7669[tool .hatch .envs .pre-commit .scripts ]
7770run = [
7871 " pre-commit run --all-files --show-diff-on-failure" ,
@@ -93,6 +86,7 @@ dependencies = [
9386 " pytest" ,
9487 " freezegun" ,
9588]
89+
9690[tool .hatch .envs .mypy .scripts ]
9791run = [
9892 " mypy src/ tests/ docs/conf.py" ,
@@ -106,6 +100,7 @@ dependencies = [
106100 " pygments" ,
107101 " freezegun" ,
108102]
103+
109104[tool .hatch .envs .tests .scripts ]
110105run = [
111106 " coverage run --parallel -m pytest"
@@ -115,11 +110,13 @@ run = [
115110dependencies = [
116111 " coverage[toml]" ,
117112]
113+
118114[tool .hatch .envs .coverage .scripts ]
119115run = [
120116 " - coverage combine" ,
121117 " coverage report" ,
122118]
119+
123120run-xml = [
124121 " coverage xml"
125122]
@@ -132,6 +129,7 @@ dependencies = [
132129 " typeguard" ,
133130 " pygments" ,
134131]
132+
135133[tool .hatch .envs .typeguard .scripts ]
136134run = [
137135 " pytest --typeguard-packages=human_readable" ,
@@ -141,6 +139,7 @@ run = [
141139dependencies = [
142140 " xdoctest[colors]" ,
143141]
142+
144143[tool .hatch .envs .xdoctest .scripts ]
145144run = [
146145 " python -m xdoctest human_readable all" ,
@@ -152,6 +151,7 @@ dependencies = [
152151 " furo" ,
153152 " myst-parser" ,
154153]
154+
155155[tool .hatch .envs .docs-build .scripts ]
156156run = [
157157 " rm -rf docs/_build" ,
@@ -165,6 +165,7 @@ dependencies = [
165165 " furo" ,
166166 " myst-parser" ,
167167]
168+
168169[tool .hatch .envs .docs .scripts ]
169170run = [
170171 " rm -rf docs/_build" ,
@@ -183,10 +184,20 @@ source = ["human_readable", "tests"]
183184show_missing = true
184185fail_under = 100
185186
186- [tool .isort ]
187- profile = " black"
188- force_single_line = true
189- lines_after_imports = 2
187+ [tool .ruff ]
188+ line-length = 80
189+
190+ [tool .ruff .lint ]
191+ select = [" B" , " B9" , " C" , " D" , " E" , " F" , " N" , " W" ]
192+ ignore = [" E203" , " E501" , " B905" ]
193+ per-file-ignores = { "times.py" = [" N806" ] }
194+
195+ [tool .ruff .lint .mccabe ]
196+ max-complexity = 10
197+
198+ [tool .ruff .lint .isort ]
199+ force-single-line = true
200+ lines-after-imports = 2
190201
191202[tool .mypy ]
192203strict = true
@@ -196,7 +207,6 @@ show_column_numbers = true
196207show_error_codes = true
197208show_error_context = true
198209
199-
200210[[tool .mypy .overrides ]]
201211module = [" pytest_mock" ]
202212ignore_missing_imports = true
0 commit comments