File tree Expand file tree Collapse file tree 2 files changed +0
-31
lines changed
Expand file tree Collapse file tree 2 files changed +0
-31
lines changed Original file line number Diff line number Diff line change 11import argparse
22import logging
33import sys
4- import warnings
54from functools import partial
65
76from decli import cli
2423 "name" : ["-n" , "--name" ],
2524 "help" : "use the given commitizen (default: cz_conventional_commits)" ,
2625 },
27- {
28- "name" : ["--version" ],
29- "action" : "store_true" ,
30- "help" : "get the version of the installed commitizen" ,
31- },
3226 ],
3327 "subcommands" : {
3428 "title" : "commands" ,
@@ -277,16 +271,6 @@ def main():
277271 elif not args .name and not conf .path :
278272 conf .update ({"name" : "cz_conventional_commits" })
279273
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-
290274 if args .debug :
291275 logging .getLogger ("commitizen" ).setLevel (logging .DEBUG )
292276 sys .excepthook = commitizen_debug_excepthook
Original file line number Diff line number Diff line change @@ -55,21 +55,6 @@ def test_ls(mocker, capsys):
5555 assert isinstance (out , str )
5656
5757
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-
7358def test_arg_debug (mocker ):
7459 testargs = ["cz" , "--debug" , "info" ]
7560 mocker .patch .object (sys , "argv" , testargs )
You can’t perform that action at this time.
0 commit comments