File tree 5 files changed +18
-9
lines changed
src/ansible_dev_environment
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
87
87
pyproject-api==1.8.0
88
88
pyproject-hooks==1.2.0
89
89
pytest==8.3.4
90
+ pytest-instafail==0.5.0
90
91
pytest-xdist==3.6.1
91
92
python-dateutil==2.9.0.post0
92
93
python-slugify==8.0.4
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ pre-commit
6
6
pydoclint
7
7
pylint
8
8
pytest
9
+ pytest-instafail
9
10
pytest-xdist
10
11
ruff
11
12
toml-sort
Original file line number Diff line number Diff line change @@ -43,11 +43,6 @@ repos:
43
43
- prettier-plugin-toml
44
44
- prettier-plugin-sort-json
45
45
46
- - repo : https://github.com/psf/black
47
- rev : 24.10.0
48
- hooks :
49
- - id : black
50
-
51
46
- repo : https://github.com/pappasam/toml-sort
52
47
rev : v0.24.2
53
48
hooks :
Original file line number Diff line number Diff line change @@ -335,6 +335,7 @@ target-version = "py310"
335
335
[tool .ruff .lint ]
336
336
ignore = [
337
337
" COM812" , # conflicts with ISC001 on format
338
+ " E501" , # line-too-long (ruff-format or black will take care of it)
338
339
" ISC001" # conflicts with COM812 on format
339
340
]
340
341
select = [" ALL" ]
Original file line number Diff line number Diff line change 3
3
from __future__ import annotations
4
4
5
5
import argparse
6
+ import logging
7
+ import sys
6
8
7
9
from argparse import HelpFormatter
8
10
from pathlib import Path
9
11
from typing import TYPE_CHECKING
10
12
11
13
14
+ logger = logging .getLogger (__name__ )
15
+
12
16
if TYPE_CHECKING :
13
17
from typing import Any
14
18
@@ -186,11 +190,11 @@ def parse() -> argparse.Namespace:
186
190
)
187
191
188
192
install .add_argument (
189
- "-adt" ,
190
- "--ansible-dev-tools " ,
193
+ # "-adt",
194
+ "--seed " ,
191
195
action = "store_true" ,
192
196
dest = "adt" ,
193
- help = "Install ansible-dev-tools in the virtual environment." ,
197
+ help = "Install seed packages inside the virtual environment (ansible-dev-tools) ." ,
194
198
)
195
199
196
200
_uninstall = subparsers .add_parser (
@@ -204,7 +208,14 @@ def parse() -> argparse.Namespace:
204
208
for subparser in subparsers .choices .values ():
205
209
_group_titles (subparser )
206
210
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 )
208
219
209
220
210
221
def _group_titles (parser : ArgumentParser ) -> None :
You can’t perform that action at this time.
0 commit comments