99from importlib import import_module
1010
1111import packaging .version
12- from azure .cli .core .breaking_change import MergedStatusTag , UpcomingBreakingChangeTag , TargetVersion
13- from knack .deprecation import Deprecated
1412from knack .log import get_logger
1513
1614from azdev .operations .statistics import _create_invoker_and_load_cmds # pylint: disable=protected-access
@@ -82,6 +80,9 @@ def _handle_custom_breaking_change(module, command, breaking_change):
8280
8381
8482def _handle_status_tag (module , command , status_tag ):
83+ from knack .deprecation import Deprecated
84+ from azure .cli .core .breaking_change import MergedStatusTag , UpcomingBreakingChangeTag , TargetVersion
85+
8586 if isinstance (status_tag , MergedStatusTag ):
8687 for tag in status_tag .tags :
8788 yield from _handle_status_tag (module , command , tag )
@@ -107,6 +108,8 @@ def _handle_command_deprecation(module, command, deprecate_info):
107108
108109
109110def _calc_target_of_arg_deprecation (arg_name , arg_settings ):
111+ from knack .deprecation import Deprecated
112+
110113 option_str_list = []
111114 depr = arg_settings .get ('deprecate_info' )
112115 for option in arg_settings .get ('option_list' , []):
@@ -128,6 +131,8 @@ def _handle_arg_deprecation(module, command, target, deprecation_info):
128131
129132
130133def _handle_options_deprecation (module , command , options ):
134+ from knack .deprecation import Deprecated
135+
131136 deprecate_option_map = defaultdict (lambda : [])
132137 for option in options :
133138 if isinstance (option , Deprecated ):
0 commit comments