@@ -61,17 +61,11 @@ python = ["3.9", "3.10", "3.11", "3.12"]
6161
6262[tool .hatch .envs .pre-commit ]
6363dependencies = [
64- " bandit" ,
65- " black" ,
66- " flake8" ,
67- " flake8-bugbear == 22.*" ,
68- " flake8-docstrings" ,
69- " isort" ,
70- " pep8-naming" ,
64+ " ruff" ,
7165 " pre-commit" ,
7266 " pre-commit-hooks" ,
73- " pyupgrade" ,
7467]
68+
7569[tool .hatch .envs .pre-commit .scripts ]
7670run = [
7771 " pre-commit run --all-files --show-diff-on-failure" ,
@@ -92,6 +86,7 @@ dependencies = [
9286 " pytest" ,
9387 " freezegun" ,
9488]
89+
9590[tool .hatch .envs .mypy .scripts ]
9691run = [
9792 " mypy src/ tests/ docs/conf.py" ,
@@ -105,6 +100,7 @@ dependencies = [
105100 " pygments" ,
106101 " freezegun" ,
107102]
103+
108104[tool .hatch .envs .tests .scripts ]
109105run = [
110106 " coverage run --parallel -m pytest"
@@ -114,11 +110,13 @@ run = [
114110dependencies = [
115111 " coverage[toml]" ,
116112]
113+
117114[tool .hatch .envs .coverage .scripts ]
118115run = [
119116 " - coverage combine" ,
120117 " coverage report" ,
121118]
119+
122120run-xml = [
123121 " coverage xml"
124122]
@@ -131,6 +129,7 @@ dependencies = [
131129 " typeguard" ,
132130 " pygments" ,
133131]
132+
134133[tool .hatch .envs .typeguard .scripts ]
135134run = [
136135 " pytest --typeguard-packages=human_readable" ,
@@ -140,6 +139,7 @@ run = [
140139dependencies = [
141140 " xdoctest[colors]" ,
142141]
142+
143143[tool .hatch .envs .xdoctest .scripts ]
144144run = [
145145 " python -m xdoctest human_readable all" ,
@@ -151,6 +151,7 @@ dependencies = [
151151 " furo" ,
152152 " myst-parser" ,
153153]
154+
154155[tool .hatch .envs .docs-build .scripts ]
155156run = [
156157 " rm -rf docs/_build" ,
@@ -164,6 +165,7 @@ dependencies = [
164165 " furo" ,
165166 " myst-parser" ,
166167]
168+
167169[tool .hatch .envs .docs .scripts ]
168170run = [
169171 " rm -rf docs/_build" ,
@@ -182,7 +184,18 @@ source = ["human_readable", "tests"]
182184show_missing = true
183185fail_under = 100
184186
185- [tool .isort ]
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" , " W503" , " B905" ]
193+ per-file-ignores = [ " times.py:N806" ]
194+
195+ [tool .ruff .lint .mccabe ]
196+ max-complexity = 10
197+
198+ [tool .ruff .lint .isort ]
186199profile = " black"
187200force_single_line = true
188201lines_after_imports = 2
@@ -195,7 +208,6 @@ show_column_numbers = true
195208show_error_codes = true
196209show_error_context = true
197210
198-
199211[[tool .mypy .overrides ]]
200212module = [" pytest_mock" ]
201213ignore_missing_imports = true
0 commit comments