azdev 0.1.63__tar.gz → 0.1.65__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {azdev-0.1.63 → azdev-0.1.65}/HISTORY.rst +8 -0
- {azdev-0.1.63/azdev.egg-info → azdev-0.1.65}/PKG-INFO +10 -2
- {azdev-0.1.63 → azdev-0.1.65}/azdev/__init__.py +1 -1
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/command_change/__init__.py +10 -2
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/command_change/custom.py +49 -2
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/extensions/version_upgrade.py +6 -4
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/regex.py +7 -6
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/style.py +8 -9
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/testtool/profile_context.py +2 -0
- {azdev-0.1.63 → azdev-0.1.65/azdev.egg-info}/PKG-INFO +10 -2
- {azdev-0.1.63 → azdev-0.1.65}/azdev.egg-info/requires.txt +1 -1
- {azdev-0.1.63 → azdev-0.1.65}/setup.py +1 -1
- {azdev-0.1.63 → azdev-0.1.65}/LICENSE +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/MANIFEST.in +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/README.md +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/README.rst +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/__main__.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/commands.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/completer.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/config/__init__.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/config/cli.flake8 +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/config/cli_pylintrc +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/config/ext.flake8 +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/config/ext_pylintrc +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/help.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/mod_templates/HISTORY.rst +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/mod_templates/README.rst +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/mod_templates/_client_factory.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/mod_templates/_help.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/mod_templates/_params.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/mod_templates/_validators.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/mod_templates/azext_metadata.json +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/mod_templates/blank__init__.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/mod_templates/commands.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/mod_templates/custom.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/mod_templates/module__init__.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/mod_templates/pkg_declare__init__.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/mod_templates/setup.cfg +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/mod_templates/setup.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/mod_templates/test_service_scenario.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/__init__.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/cmdcov/__init__.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/cmdcov/_macros.j2 +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/cmdcov/cmdcov.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/cmdcov/component.css +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/cmdcov/component.js +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/cmdcov/favicon.ico +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/cmdcov/index.j2 +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/cmdcov/index2.j2 +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/cmdcov/module.j2 +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/code_gen.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/command_change/util.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/constant.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/extensions/__init__.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/extensions/util.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/help/__init__.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/help/refdoc/__init__.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/help/refdoc/conf.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/legal.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/linter/__init__.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/linter/linter.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/linter/pylint_checkers/__init__.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/linter/pylint_checkers/show_command.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/linter/rule_decorators.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/linter/rules/__init__.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/linter/rules/ci_exclusions.yml +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/linter/rules/command_coverage_rules.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/linter/rules/command_group_rules.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/linter/rules/command_rules.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/linter/rules/help_rules.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/linter/rules/linter_exclusions.yml +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/linter/rules/parameter_rules.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/linter/util.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/performance.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/pypi.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/python_sdk.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/resource.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/setup.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/statistics/__init__.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/statistics/util.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/testtool/__init__.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/testtool/incremental_strategy.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/operations/testtool/pytest_runner.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/params.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/transformers.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/utilities/__init__.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/utilities/command.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/utilities/config.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/utilities/const.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/utilities/display.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/utilities/git_util.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/utilities/path.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/utilities/pypi.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/utilities/testing.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev/utilities/tools.py +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev.egg-info/SOURCES.txt +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev.egg-info/dependency_links.txt +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev.egg-info/entry_points.txt +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/azdev.egg-info/top_level.txt +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/pyproject.toml +0 -0
- {azdev-0.1.63 → azdev-0.1.65}/setup.cfg +0 -0
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Release History
|
|
4
4
|
===============
|
|
5
|
+
0.1.65
|
|
6
|
+
++++++
|
|
7
|
+
* `azdev command-change meta-diff`: Add diff support for deprecate_info in subgroup, cmd, parameters and options.
|
|
8
|
+
|
|
9
|
+
0.1.64
|
|
10
|
+
++++++
|
|
11
|
+
* `azdev extension cal-next-version`: Fix module name when querying extension modules from index.
|
|
12
|
+
|
|
5
13
|
0.1.63
|
|
6
14
|
++++++
|
|
7
15
|
* `azdev`: Update required version for `azure-cli-diff-tool`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: azdev
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.65
|
|
4
4
|
Summary: Microsoft Azure CLI Developer Tools
|
|
5
5
|
Home-page: https://github.com/Azure/azure-cli-dev-tools
|
|
6
6
|
Author: Microsoft Corporation
|
|
@@ -36,7 +36,7 @@ Requires-Dist: sphinx==1.6.7
|
|
|
36
36
|
Requires-Dist: tox
|
|
37
37
|
Requires-Dist: jsbeautifier~=1.14.7
|
|
38
38
|
Requires-Dist: deepdiff~=6.3.0
|
|
39
|
-
Requires-Dist: azure-cli-diff-tool~=0.0.
|
|
39
|
+
Requires-Dist: azure-cli-diff-tool~=0.0.6
|
|
40
40
|
Requires-Dist: packaging
|
|
41
41
|
Requires-Dist: tqdm
|
|
42
42
|
Requires-Dist: wheel==0.30.0
|
|
@@ -145,6 +145,14 @@ License
|
|
|
145
145
|
|
|
146
146
|
Release History
|
|
147
147
|
===============
|
|
148
|
+
0.1.65
|
|
149
|
+
++++++
|
|
150
|
+
* `azdev command-change meta-diff`: Add diff support for deprecate_info in subgroup, cmd, parameters and options.
|
|
151
|
+
|
|
152
|
+
0.1.64
|
|
153
|
+
++++++
|
|
154
|
+
* `azdev extension cal-next-version`: Fix module name when querying extension modules from index.
|
|
155
|
+
|
|
148
156
|
0.1.63
|
|
149
157
|
++++++
|
|
150
158
|
* `azdev`: Update required version for `azure-cli-diff-tool`.
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
# license information.
|
|
5
5
|
# -----------------------------------------------------------------------------
|
|
6
6
|
|
|
7
|
-
# pylint: disable=no-else-return
|
|
7
|
+
# pylint: disable=no-else-return, too-many-nested-blocks
|
|
8
8
|
|
|
9
9
|
import time
|
|
10
10
|
|
|
11
11
|
from knack.log import get_logger
|
|
12
12
|
import azure_cli_diff_tool
|
|
13
13
|
from azdev.utilities import display, require_azure_cli, heading, get_path_table, filter_by_git_diff
|
|
14
|
-
from .custom import DiffExportFormat, get_commands_meta
|
|
14
|
+
from .custom import DiffExportFormat, get_commands_meta, STORED_DEPRECATION_KEY
|
|
15
15
|
from .util import export_commands_meta
|
|
16
16
|
from ..statistics import _create_invoker_and_load_cmds, _get_command_source, \
|
|
17
17
|
_command_codegen_info # pylint: disable=protected-access
|
|
@@ -92,6 +92,14 @@ def export_command_meta(modules=None, git_source=None, git_target=None, git_repo
|
|
|
92
92
|
"supports_no_wait": command.supports_no_wait,
|
|
93
93
|
"is_preview": command.command_kwargs.get("is_preview", False)
|
|
94
94
|
}
|
|
95
|
+
|
|
96
|
+
if hasattr(command, "deprecate_info"):
|
|
97
|
+
for info_key in STORED_DEPRECATION_KEY:
|
|
98
|
+
if hasattr(command.deprecate_info, info_key) and getattr(command.deprecate_info, info_key):
|
|
99
|
+
if command_info.get("deprecate_info", None) is None:
|
|
100
|
+
command_info["deprecate_info"] = {}
|
|
101
|
+
command_info["deprecate_info"][info_key] = getattr(command.deprecate_info, info_key)
|
|
102
|
+
|
|
95
103
|
module_loader = command_loader.cmd_to_loader_map[command_name]
|
|
96
104
|
for loader in module_loader:
|
|
97
105
|
loader.skip_applicability = True
|
|
@@ -11,6 +11,8 @@ from .util import get_command_tree
|
|
|
11
11
|
|
|
12
12
|
logger = get_logger(__name__)
|
|
13
13
|
|
|
14
|
+
STORED_DEPRECATION_KEY = ["expiration", "target", "redirect", "hide"]
|
|
15
|
+
|
|
14
16
|
|
|
15
17
|
class DiffExportFormat(Enum):
|
|
16
18
|
DICT = "dict"
|
|
@@ -52,6 +54,35 @@ def process_arg_options(argument_settings, para):
|
|
|
52
54
|
para["options"] = sorted(option_list)
|
|
53
55
|
|
|
54
56
|
|
|
57
|
+
def process_arg_options_deprecation(argument_settings, para):
|
|
58
|
+
if not argument_settings.get("options_list", None):
|
|
59
|
+
return
|
|
60
|
+
raw_options_list = argument_settings["options_list"]
|
|
61
|
+
option_deprecation_list = []
|
|
62
|
+
for opt in raw_options_list:
|
|
63
|
+
opt_type = opt.__class__.__name__
|
|
64
|
+
if opt_type != "Deprecated":
|
|
65
|
+
continue
|
|
66
|
+
opt_deprecation = {}
|
|
67
|
+
for info_key in STORED_DEPRECATION_KEY:
|
|
68
|
+
if hasattr(opt, info_key) and getattr(opt, info_key):
|
|
69
|
+
opt_deprecation[info_key] = getattr(opt, info_key)
|
|
70
|
+
option_deprecation_list.append(opt_deprecation)
|
|
71
|
+
if len(option_deprecation_list) != 0:
|
|
72
|
+
para["options_deprecate_info"] = option_deprecation_list
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def process_arg_deprecation(argument_settings, para):
|
|
76
|
+
if argument_settings.get("deprecate_info", None) is None:
|
|
77
|
+
return
|
|
78
|
+
for info_key in STORED_DEPRECATION_KEY:
|
|
79
|
+
if hasattr(argument_settings["deprecate_info"], info_key) and \
|
|
80
|
+
getattr(argument_settings["deprecate_info"], info_key):
|
|
81
|
+
if para.get("deprecate_info", None) is None:
|
|
82
|
+
para["deprecate_info"] = {}
|
|
83
|
+
para["deprecate_info"][info_key] = getattr(argument_settings["deprecate_info"], info_key)
|
|
84
|
+
|
|
85
|
+
|
|
55
86
|
def process_arg_type(argument_settings, para):
|
|
56
87
|
if not argument_settings.get("type", None):
|
|
57
88
|
return
|
|
@@ -89,13 +120,13 @@ def normalize_para_types(para):
|
|
|
89
120
|
|
|
90
121
|
|
|
91
122
|
def gen_command_meta(command_info, with_help=False, with_example=False):
|
|
92
|
-
stored_property_when_exist = ["confirmation", "supports_no_wait", "is_preview"]
|
|
123
|
+
stored_property_when_exist = ["confirmation", "supports_no_wait", "is_preview", "deprecate_info"]
|
|
93
124
|
command_meta = {
|
|
94
125
|
"name": command_info["name"],
|
|
95
126
|
"is_aaz": command_info["is_aaz"],
|
|
96
127
|
}
|
|
97
128
|
for prop in stored_property_when_exist:
|
|
98
|
-
if command_info
|
|
129
|
+
if command_info.get(prop, None):
|
|
99
130
|
command_meta[prop] = command_info[prop]
|
|
100
131
|
if with_example:
|
|
101
132
|
try:
|
|
@@ -120,7 +151,9 @@ def gen_command_meta(command_info, with_help=False, with_example=False):
|
|
|
120
151
|
para = {
|
|
121
152
|
"name": settings["dest"],
|
|
122
153
|
}
|
|
154
|
+
process_arg_deprecation(settings, para)
|
|
123
155
|
process_arg_options(settings, para)
|
|
156
|
+
process_arg_options_deprecation(settings, para)
|
|
124
157
|
process_arg_type(settings, para)
|
|
125
158
|
if settings.get("required", False):
|
|
126
159
|
para["required"] = True
|
|
@@ -145,6 +178,19 @@ def gen_command_meta(command_info, with_help=False, with_example=False):
|
|
|
145
178
|
return command_meta
|
|
146
179
|
|
|
147
180
|
|
|
181
|
+
def process_command_group_deprecation(command_group_obj, command_group_info):
|
|
182
|
+
if not hasattr(command_group_obj, "group_kwargs"):
|
|
183
|
+
return
|
|
184
|
+
group_kwargs = getattr(command_group_obj, "group_kwargs")
|
|
185
|
+
if group_kwargs.get("deprecate_info", None) is None:
|
|
186
|
+
return
|
|
187
|
+
for info_key in STORED_DEPRECATION_KEY:
|
|
188
|
+
if hasattr(group_kwargs["deprecate_info"], info_key) and getattr(group_kwargs["deprecate_info"], info_key):
|
|
189
|
+
if command_group_info.get("deprecate_info", None) is None:
|
|
190
|
+
command_group_info["deprecate_info"] = {}
|
|
191
|
+
command_group_info["deprecate_info"][info_key] = getattr(group_kwargs["deprecate_info"], info_key)
|
|
192
|
+
|
|
193
|
+
|
|
148
194
|
def get_commands_meta(command_group_table, commands_info, with_help, with_example):
|
|
149
195
|
commands_meta = {}
|
|
150
196
|
|
|
@@ -172,6 +218,7 @@ def get_commands_meta(command_group_table, commands_info, with_help, with_exampl
|
|
|
172
218
|
"commands": {},
|
|
173
219
|
"sub_groups": {}
|
|
174
220
|
}
|
|
221
|
+
process_command_group_deprecation(group_info, command_group_info["sub_groups"][group_name])
|
|
175
222
|
if with_help:
|
|
176
223
|
try:
|
|
177
224
|
command_group_info["sub_groups"][group_name]["desc"] = group_info.help["short-summary"]
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# -----------------------------------------------------------------------------
|
|
6
6
|
# pylint: disable=line-too-long
|
|
7
7
|
|
|
8
|
-
# NOTE: The version
|
|
8
|
+
# NOTE: The version update rules in this doc comply with the doc below
|
|
9
9
|
# https://github.com/Azure/azure-cli/blob/release/doc/extensions/versioning_guidelines.md
|
|
10
10
|
|
|
11
11
|
from packaging.version import parse
|
|
@@ -56,7 +56,7 @@ class VersionUpgradeMod:
|
|
|
56
56
|
self.version = parse(current_version)
|
|
57
57
|
except Exception as e:
|
|
58
58
|
raise ValueError("Invalid version: {0} cause {1}".format(current_version, str(e)))
|
|
59
|
-
self.is_preview = bool(is_preview or is_experimental or (self.version.pre and self.version.pre in ["a", "b"]))
|
|
59
|
+
self.is_preview = bool(is_preview or is_experimental or (self.version.pre and self.version.pre[0] in ["a", "b"]))
|
|
60
60
|
self.has_preview_tag = is_preview
|
|
61
61
|
self.has_exp_tag = is_experimental
|
|
62
62
|
self.version_raw = current_version
|
|
@@ -92,7 +92,7 @@ class VersionUpgradeMod:
|
|
|
92
92
|
def init_version_pre_tag(self):
|
|
93
93
|
"""
|
|
94
94
|
use next version pre tag if user inputs
|
|
95
|
-
otherwise,
|
|
95
|
+
otherwise, consistent with the preview tag
|
|
96
96
|
"""
|
|
97
97
|
if self.next_version_pre_tag is not None:
|
|
98
98
|
return
|
|
@@ -187,9 +187,11 @@ class VersionUpgradeMod:
|
|
|
187
187
|
if self.module_name not in extension_data["extensions"]:
|
|
188
188
|
return
|
|
189
189
|
has_stable, max_stable_major = self.find_max_version(
|
|
190
|
-
extension_data["extensions"][self.
|
|
190
|
+
extension_data["extensions"][self.module_name])
|
|
191
191
|
if has_stable:
|
|
192
192
|
self.last_stable_major = max_stable_major
|
|
193
|
+
else:
|
|
194
|
+
self.last_stable_major = 0
|
|
193
195
|
except Exception as e:
|
|
194
196
|
raise ValueError(str(e))
|
|
195
197
|
|
|
@@ -88,16 +88,17 @@ def search_argument_context(row_num, lines):
|
|
|
88
88
|
cmds = []
|
|
89
89
|
while row_num > 0:
|
|
90
90
|
row_num -= 1
|
|
91
|
-
# Match `with self.argument_context('') as c:`
|
|
92
|
-
sub_pattern0 = r'with self.argument_context\(\'(.*?)\'[\),]'
|
|
91
|
+
# Match `with self.argument_context(['"]['"]) as c:`
|
|
92
|
+
sub_pattern0 = r'with self.argument_context\([\'\"](.*?)[\'\"][\),]'
|
|
93
93
|
# Match `with self.argument_context(scope) as c:`
|
|
94
94
|
sub_pattern1 = r'with self.argument_context\(scope[\),]'
|
|
95
|
-
# Match `with self.argument_context(
|
|
96
|
-
sub_pattern2 = r'with self.argument_context\(\'(.*)\'.format\(scope\)\)'
|
|
95
|
+
# Match `with self.argument_context(['"]{} stop['"].format(scope)) as c:',
|
|
96
|
+
sub_pattern2 = r'with self.argument_context\([\'\"](.*)[\'\"].format\(scope\)\)'
|
|
97
|
+
# There are many matching patterns, but their proportion is very small. Ignore these commands.
|
|
97
98
|
ref0 = re.findall(sub_pattern0, lines[row_num])
|
|
98
99
|
ref1 = re.findall(sub_pattern1, lines[row_num])
|
|
99
100
|
ref2 = re.findall(sub_pattern2, lines[row_num])
|
|
100
|
-
# Match `with self.argument_context('') as c:`
|
|
101
|
+
# Match `with self.argument_context(['"]['"]) as c:`
|
|
101
102
|
if ref0:
|
|
102
103
|
cmds = ref0
|
|
103
104
|
break
|
|
@@ -107,7 +108,7 @@ def search_argument_context(row_num, lines):
|
|
|
107
108
|
cmds = json.loads(
|
|
108
109
|
re.findall(sub_pattern, lines[row_num - 1])[0].replace('\'', '"'))
|
|
109
110
|
break
|
|
110
|
-
# Match `with self.argument_context(
|
|
111
|
+
# Match `with self.argument_context(['"]{} stop['"].format(scope)) as c:',
|
|
111
112
|
if ref2:
|
|
112
113
|
sub_pattern = r'for scope in (.*):'
|
|
113
114
|
format_strings = json.loads(
|
|
@@ -192,16 +192,15 @@ def _run_pep8(modules):
|
|
|
192
192
|
|
|
193
193
|
|
|
194
194
|
def _config_file_path(style_type="pylint"):
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
)
|
|
195
|
+
from configparser import NoSectionError
|
|
196
|
+
try:
|
|
197
|
+
cli_repo_path = get_azdev_config().get("cli", "repo_path")
|
|
198
|
+
except NoSectionError:
|
|
199
|
+
cli_repo_path = None
|
|
201
200
|
try:
|
|
202
|
-
ext_repo_path =
|
|
203
|
-
except
|
|
204
|
-
ext_repo_path =
|
|
201
|
+
ext_repo_path = get_azdev_config().get("ext", "repo_paths").split(',')[0]
|
|
202
|
+
except NoSectionError:
|
|
203
|
+
ext_repo_path = None
|
|
205
204
|
|
|
206
205
|
if style_type not in ["pylint", "flake8"]:
|
|
207
206
|
raise ValueError("style_tyle value allows only: pylint, flake8.")
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
# license information.
|
|
5
5
|
# -----------------------------------------------------------------------------
|
|
6
6
|
|
|
7
|
+
import os
|
|
7
8
|
import traceback
|
|
8
9
|
|
|
9
10
|
from knack.log import get_logger
|
|
@@ -14,6 +15,7 @@ from azdev.utilities import display
|
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
logger = get_logger(__name__)
|
|
18
|
+
os.environ['AZURE_CORE_COLLECT_TELEMETRY'] = 'False'
|
|
17
19
|
|
|
18
20
|
|
|
19
21
|
class ProfileContext:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: azdev
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.65
|
|
4
4
|
Summary: Microsoft Azure CLI Developer Tools
|
|
5
5
|
Home-page: https://github.com/Azure/azure-cli-dev-tools
|
|
6
6
|
Author: Microsoft Corporation
|
|
@@ -36,7 +36,7 @@ Requires-Dist: sphinx==1.6.7
|
|
|
36
36
|
Requires-Dist: tox
|
|
37
37
|
Requires-Dist: jsbeautifier~=1.14.7
|
|
38
38
|
Requires-Dist: deepdiff~=6.3.0
|
|
39
|
-
Requires-Dist: azure-cli-diff-tool~=0.0.
|
|
39
|
+
Requires-Dist: azure-cli-diff-tool~=0.0.6
|
|
40
40
|
Requires-Dist: packaging
|
|
41
41
|
Requires-Dist: tqdm
|
|
42
42
|
Requires-Dist: wheel==0.30.0
|
|
@@ -145,6 +145,14 @@ License
|
|
|
145
145
|
|
|
146
146
|
Release History
|
|
147
147
|
===============
|
|
148
|
+
0.1.65
|
|
149
|
+
++++++
|
|
150
|
+
* `azdev command-change meta-diff`: Add diff support for deprecate_info in subgroup, cmd, parameters and options.
|
|
151
|
+
|
|
152
|
+
0.1.64
|
|
153
|
+
++++++
|
|
154
|
+
* `azdev extension cal-next-version`: Fix module name when querying extension modules from index.
|
|
155
|
+
|
|
148
156
|
0.1.63
|
|
149
157
|
++++++
|
|
150
158
|
* `azdev`: Update required version for `azure-cli-diff-tool`.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|