File tree 2 files changed +0
-31
lines changed 2 files changed +0
-31
lines changed Original file line number Diff line number Diff line change 1
1
import argparse
2
2
import logging
3
3
import sys
4
- import warnings
5
4
from functools import partial
6
5
7
6
from decli import cli
24
23
"name" : ["-n" , "--name" ],
25
24
"help" : "use the given commitizen (default: cz_conventional_commits)" ,
26
25
},
27
- {
28
- "name" : ["--version" ],
29
- "action" : "store_true" ,
30
- "help" : "get the version of the installed commitizen" ,
31
- },
32
26
],
33
27
"subcommands" : {
34
28
"title" : "commands" ,
@@ -277,16 +271,6 @@ def main():
277
271
elif not args .name and not conf .path :
278
272
conf .update ({"name" : "cz_conventional_commits" })
279
273
280
- if args .version :
281
- warnings .warn (
282
- (
283
- "'cz --version' will be deprecated in next major version. "
284
- "Please use 'cz version' command from your scripts"
285
- ),
286
- category = DeprecationWarning ,
287
- )
288
- args .func = commands .Version
289
-
290
274
if args .debug :
291
275
logging .getLogger ("commitizen" ).setLevel (logging .DEBUG )
292
276
sys .excepthook = commitizen_debug_excepthook
Original file line number Diff line number Diff line change @@ -55,21 +55,6 @@ def test_ls(mocker, capsys):
55
55
assert isinstance (out , str )
56
56
57
57
58
- def test_arg_version (mocker , capsys ):
59
- testargs = ["cz" , "--version" ]
60
- mocker .patch .object (sys , "argv" , testargs )
61
-
62
- with pytest .warns (DeprecationWarning ) as record :
63
- cli .main ()
64
- out , _ = capsys .readouterr ()
65
- assert out .strip () == __version__
66
-
67
- assert record [0 ].message .args [0 ] == (
68
- "'cz --version' will be deprecated in next major version. "
69
- "Please use 'cz version' command from your scripts"
70
- )
71
-
72
-
73
58
def test_arg_debug (mocker ):
74
59
testargs = ["cz" , "--debug" , "info" ]
75
60
mocker .patch .object (sys , "argv" , testargs )
You can’t perform that action at this time.
0 commit comments