File tree Expand file tree Collapse file tree 5 files changed +18
-9
lines changed
src/ansible_dev_environment Expand file tree Collapse file tree 5 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ pymdown-extensions==10.12
8787pyproject-api==1.8.0
8888pyproject-hooks==1.2.0
8989pytest==8.3.4
90+ pytest-instafail==0.5.0
9091pytest-xdist==3.6.1
9192python-dateutil==2.9.0.post0
9293python-slugify==8.0.4
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ pre-commit
66pydoclint
77pylint
88pytest
9+ pytest-instafail
910pytest-xdist
1011ruff
1112toml-sort
Original file line number Diff line number Diff line change @@ -43,11 +43,6 @@ repos:
4343 - prettier-plugin-toml
4444 - prettier-plugin-sort-json
4545
46- - repo : https://github.com/psf/black
47- rev : 24.10.0
48- hooks :
49- - id : black
50-
5146 - repo : https://github.com/pappasam/toml-sort
5247 rev : v0.24.2
5348 hooks :
Original file line number Diff line number Diff line change @@ -335,6 +335,7 @@ target-version = "py310"
335335[tool .ruff .lint ]
336336ignore = [
337337 " COM812" , # conflicts with ISC001 on format
338+ " E501" , # line-too-long (ruff-format or black will take care of it)
338339 " ISC001" # conflicts with COM812 on format
339340]
340341select = [" ALL" ]
Original file line number Diff line number Diff line change 33from __future__ import annotations
44
55import argparse
6+ import logging
7+ import sys
68
79from argparse import HelpFormatter
810from pathlib import Path
911from typing import TYPE_CHECKING
1012
1113
14+ logger = logging .getLogger (__name__ )
15+
1216if TYPE_CHECKING :
1317 from typing import Any
1418
@@ -186,11 +190,11 @@ def parse() -> argparse.Namespace:
186190 )
187191
188192 install .add_argument (
189- "-adt" ,
190- "--ansible-dev-tools " ,
193+ # "-adt",
194+ "--seed " ,
191195 action = "store_true" ,
192196 dest = "adt" ,
193- help = "Install ansible-dev-tools in the virtual environment." ,
197+ help = "Install seed packages inside the virtual environment (ansible-dev-tools) ." ,
194198 )
195199
196200 _uninstall = subparsers .add_parser (
@@ -204,7 +208,14 @@ def parse() -> argparse.Namespace:
204208 for subparser in subparsers .choices .values ():
205209 _group_titles (subparser )
206210
207- return parser .parse_args ()
211+ args = sys .argv [1 :]
212+ for i , v in enumerate (args ):
213+ for old in ("-adt" , "--ansible-dev-tools" ):
214+ if v == old :
215+ msg = f"Replace the deprecated { old } argument with --seed to avoid future execution failure."
216+ logger .warning (msg )
217+ args [i ] = "--seed"
218+ return parser .parse_args (args )
208219
209220
210221def _group_titles (parser : ArgumentParser ) -> None :
You can’t perform that action at this time.
0 commit comments