@@ -39,18 +39,25 @@ Repository = "https://github.com/python-backoff/backoff"
3939
4040[dependency-groups ]
4141dev = [
42- { include-group = " tests" },
43- " flake8>=4.0.1" ,
44- " mypy>=0.942" ,
45- " types-requests>=2.27.20" ,
42+ { include-group = " lint" },
43+ { include-group = " test" },
44+ { include-group = " typing" },
45+ ]
46+ lint = [
47+ " ruff>=0.12.9" ,
4648]
47- tests = [
49+ test = [
4850 " coverage>=7.2.7" ,
4951 " pytest>=7.1.2" ,
5052 " pytest-asyncio>=0.18.3" ,
5153 " requests>=2.26.0" ,
5254 " responses>=0.20.0" ,
5355]
56+ typing = [
57+ { include-group = " test" },
58+ " mypy>=0.942" ,
59+ " types-requests>=2.27.20" ,
60+ ]
5461
5562[tool .hatch .build .targets .sdist ]
5663include = [" backoff" ]
@@ -60,8 +67,9 @@ include = ["backoff"]
6067
6168[tool .tox ]
6269min_version = " 4.22"
63- requires = [ " tox" , " tox-uv" ]
70+ requires = [ " tox" , " tox-gh " , " tox- uv" ]
6471env_list = [
72+ " format" ,
6573 " 3.7" ,
6674 " 3.8" ,
6775 " 3.9" ,
@@ -70,12 +78,16 @@ env_list = [
7078 " 3.12" ,
7179 " 3.13" ,
7280 " 3.14" ,
81+ " lint" ,
82+ " typing" ,
7383]
7484
7585[tool .tox .env_run_base ]
7686description = " run unit tests"
77- dependency_groups = [ " tests" ]
78- commands = [ [ " coverage" , " run" , " -m" , " pytest" , { replace = " posargs" , default = [ " tests" ], extend = true } ] ]
87+ dependency_groups = [ " test" ]
88+ commands = [
89+ [ " coverage" , " run" , " -m" , " pytest" , { replace = " posargs" , default = [ " tests" ], extend = true } ],
90+ ]
7991
8092[tool .tox .env .coverage ]
8193description = " generate coverage report"
@@ -89,13 +101,51 @@ depends = [
89101 " 3.13" ,
90102 " 3.14" ,
91103]
92- dependency_groups = [ " tests " ]
104+ dependency_groups = [ " test " ]
93105commands = [
94106 [ " coverage" , " combine" ],
95107 [ " coverage" , " report" ],
96108 [ " coverage" , " xml" ],
97109]
98110
111+ [tool .tox .env .format ]
112+ description = " format code"
113+ dependency_groups = [ " lint" ]
114+ commands = [
115+ [ " ruff" , " check" , " --fix" , { replace = " posargs" , default = [ " backoff" , " tests" ], extend = true } ],
116+ ]
117+
118+ [tool .tox .env .lint ]
119+ description = " lint code"
120+ dependency_groups = [ " lint" ]
121+ commands = [
122+ [ " ruff" , " check" , { replace = " posargs" , default = [ " backoff" , " tests" ], extend = true } ],
123+ ]
124+
125+ [tool .tox .env .typing ]
126+ description = " run type checking"
127+ dependency_groups = [ " typing" ]
128+ commands = [
129+ [
130+ " mypy" ,
131+ " --show-error-codes" ,
132+ { replace = " posargs" , default = [
133+ " backoff" ,
134+ " tests" ,
135+ ], extend = true },
136+ ],
137+ ]
138+
139+ [tool .tox .gh .python ]
140+ "3.14" = [" 3.14" , " lint" , " typing" ]
141+ "3.13" = [" 3.13" ]
142+ "3.12" = [" 3.12" ]
143+ "3.11" = [" 3.11" ]
144+ "3.10" = [" 3.10" ]
145+ "3.9" = [" 3.9" ]
146+ "3.8" = [" 3.8" ]
147+ "3.7" = [" 3.7" ]
148+
99149[tool .pytest .ini_options ]
100150filterwarnings = [
101151 " error" ,
0 commit comments