azdev 0.1.71__tar.gz → 0.1.73__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.
Files changed (101) hide show
  1. {azdev-0.1.71 → azdev-0.1.73}/HISTORY.rst +9 -0
  2. {azdev-0.1.71/azdev.egg-info → azdev-0.1.73}/PKG-INFO +11 -2
  3. {azdev-0.1.71 → azdev-0.1.73}/azdev/__init__.py +1 -1
  4. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/command_change/__init__.py +12 -2
  5. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/command_change/custom.py +15 -9
  6. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/linter/pylint_checkers/show_command.py +0 -2
  7. {azdev-0.1.71 → azdev-0.1.73/azdev.egg-info}/PKG-INFO +11 -2
  8. {azdev-0.1.71 → azdev-0.1.73}/azdev.egg-info/requires.txt +1 -1
  9. {azdev-0.1.71 → azdev-0.1.73}/setup.py +1 -1
  10. {azdev-0.1.71 → azdev-0.1.73}/LICENSE +0 -0
  11. {azdev-0.1.71 → azdev-0.1.73}/MANIFEST.in +0 -0
  12. {azdev-0.1.71 → azdev-0.1.73}/README.md +0 -0
  13. {azdev-0.1.71 → azdev-0.1.73}/README.rst +0 -0
  14. {azdev-0.1.71 → azdev-0.1.73}/azdev/__main__.py +0 -0
  15. {azdev-0.1.71 → azdev-0.1.73}/azdev/commands.py +0 -0
  16. {azdev-0.1.71 → azdev-0.1.73}/azdev/completer.py +0 -0
  17. {azdev-0.1.71 → azdev-0.1.73}/azdev/config/__init__.py +0 -0
  18. {azdev-0.1.71 → azdev-0.1.73}/azdev/config/cli.flake8 +0 -0
  19. {azdev-0.1.71 → azdev-0.1.73}/azdev/config/cli_pylintrc +0 -0
  20. {azdev-0.1.71 → azdev-0.1.73}/azdev/config/ext.flake8 +0 -0
  21. {azdev-0.1.71 → azdev-0.1.73}/azdev/config/ext_pylintrc +0 -0
  22. {azdev-0.1.71 → azdev-0.1.73}/azdev/help.py +0 -0
  23. {azdev-0.1.71 → azdev-0.1.73}/azdev/mod_templates/HISTORY.rst +0 -0
  24. {azdev-0.1.71 → azdev-0.1.73}/azdev/mod_templates/README.rst +0 -0
  25. {azdev-0.1.71 → azdev-0.1.73}/azdev/mod_templates/_client_factory.py +0 -0
  26. {azdev-0.1.71 → azdev-0.1.73}/azdev/mod_templates/_help.py +0 -0
  27. {azdev-0.1.71 → azdev-0.1.73}/azdev/mod_templates/_params.py +0 -0
  28. {azdev-0.1.71 → azdev-0.1.73}/azdev/mod_templates/_validators.py +0 -0
  29. {azdev-0.1.71 → azdev-0.1.73}/azdev/mod_templates/azext_metadata.json +0 -0
  30. {azdev-0.1.71 → azdev-0.1.73}/azdev/mod_templates/blank__init__.py +0 -0
  31. {azdev-0.1.71 → azdev-0.1.73}/azdev/mod_templates/commands.py +0 -0
  32. {azdev-0.1.71 → azdev-0.1.73}/azdev/mod_templates/custom.py +0 -0
  33. {azdev-0.1.71 → azdev-0.1.73}/azdev/mod_templates/module__init__.py +0 -0
  34. {azdev-0.1.71 → azdev-0.1.73}/azdev/mod_templates/pkg_declare__init__.py +0 -0
  35. {azdev-0.1.71 → azdev-0.1.73}/azdev/mod_templates/setup.cfg +0 -0
  36. {azdev-0.1.71 → azdev-0.1.73}/azdev/mod_templates/setup.py +0 -0
  37. {azdev-0.1.71 → azdev-0.1.73}/azdev/mod_templates/test_service_scenario.py +0 -0
  38. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/__init__.py +0 -0
  39. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/cmdcov/__init__.py +0 -0
  40. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/cmdcov/_macros.j2 +0 -0
  41. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/cmdcov/cmdcov.py +0 -0
  42. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/cmdcov/component.css +0 -0
  43. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/cmdcov/component.js +0 -0
  44. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/cmdcov/favicon.ico +0 -0
  45. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/cmdcov/index.j2 +0 -0
  46. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/cmdcov/index2.j2 +0 -0
  47. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/cmdcov/module.j2 +0 -0
  48. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/code_gen.py +0 -0
  49. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/command_change/util.py +0 -0
  50. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/constant.py +0 -0
  51. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/extensions/__init__.py +0 -0
  52. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/extensions/util.py +0 -0
  53. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/extensions/version_upgrade.py +0 -0
  54. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/help/__init__.py +0 -0
  55. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/help/refdoc/__init__.py +0 -0
  56. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/help/refdoc/conf.py +0 -0
  57. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/legal.py +0 -0
  58. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/linter/__init__.py +0 -0
  59. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/linter/linter.py +0 -0
  60. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/linter/pylint_checkers/__init__.py +0 -0
  61. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/linter/rule_decorators.py +0 -0
  62. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/linter/rules/__init__.py +0 -0
  63. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/linter/rules/ci_exclusions.yml +0 -0
  64. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/linter/rules/command_coverage_rules.py +0 -0
  65. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/linter/rules/command_group_rules.py +0 -0
  66. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/linter/rules/command_rules.py +0 -0
  67. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/linter/rules/help_rules.py +0 -0
  68. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/linter/rules/linter_exclusions.yml +0 -0
  69. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/linter/rules/parameter_rules.py +0 -0
  70. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/linter/util.py +0 -0
  71. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/performance.py +0 -0
  72. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/pypi.py +0 -0
  73. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/python_sdk.py +0 -0
  74. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/regex.py +0 -0
  75. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/resource.py +0 -0
  76. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/setup.py +0 -0
  77. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/statistics/__init__.py +0 -0
  78. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/statistics/util.py +0 -0
  79. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/style.py +0 -0
  80. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/testtool/__init__.py +0 -0
  81. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/testtool/incremental_strategy.py +0 -0
  82. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/testtool/profile_context.py +0 -0
  83. {azdev-0.1.71 → azdev-0.1.73}/azdev/operations/testtool/pytest_runner.py +0 -0
  84. {azdev-0.1.71 → azdev-0.1.73}/azdev/params.py +0 -0
  85. {azdev-0.1.71 → azdev-0.1.73}/azdev/transformers.py +0 -0
  86. {azdev-0.1.71 → azdev-0.1.73}/azdev/utilities/__init__.py +0 -0
  87. {azdev-0.1.71 → azdev-0.1.73}/azdev/utilities/command.py +0 -0
  88. {azdev-0.1.71 → azdev-0.1.73}/azdev/utilities/config.py +0 -0
  89. {azdev-0.1.71 → azdev-0.1.73}/azdev/utilities/const.py +0 -0
  90. {azdev-0.1.71 → azdev-0.1.73}/azdev/utilities/display.py +0 -0
  91. {azdev-0.1.71 → azdev-0.1.73}/azdev/utilities/git_util.py +0 -0
  92. {azdev-0.1.71 → azdev-0.1.73}/azdev/utilities/path.py +0 -0
  93. {azdev-0.1.71 → azdev-0.1.73}/azdev/utilities/pypi.py +0 -0
  94. {azdev-0.1.71 → azdev-0.1.73}/azdev/utilities/testing.py +0 -0
  95. {azdev-0.1.71 → azdev-0.1.73}/azdev/utilities/tools.py +0 -0
  96. {azdev-0.1.71 → azdev-0.1.73}/azdev.egg-info/SOURCES.txt +0 -0
  97. {azdev-0.1.71 → azdev-0.1.73}/azdev.egg-info/dependency_links.txt +0 -0
  98. {azdev-0.1.71 → azdev-0.1.73}/azdev.egg-info/entry_points.txt +0 -0
  99. {azdev-0.1.71 → azdev-0.1.73}/azdev.egg-info/top_level.txt +0 -0
  100. {azdev-0.1.71 → azdev-0.1.73}/pyproject.toml +0 -0
  101. {azdev-0.1.71 → azdev-0.1.73}/setup.cfg +0 -0
@@ -2,6 +2,15 @@
2
2
 
3
3
  Release History
4
4
  ===============
5
+ 0.1.73
6
+ ++++++
7
+ * `azdev command-change meta-export`: Add `has_completer` to denote whether completer is configed in arg
8
+ * `azdev command-change meta-export`: Extracting arg help and example for loaded HelpFiles
9
+
10
+ 0.1.72
11
+ ++++++
12
+ * Bump `pylint` to 3
13
+
5
14
  0.1.71
6
15
  ++++++
7
16
  * `azdev extension show`: Show detailed extension info that installed in your development environment.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: azdev
3
- Version: 0.1.71
3
+ Version: 0.1.73
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
@@ -26,7 +26,7 @@ Requires-Dist: flake8
26
26
  Requires-Dist: gitpython
27
27
  Requires-Dist: jinja2
28
28
  Requires-Dist: knack
29
- Requires-Dist: pylint<3,>=2.12
29
+ Requires-Dist: pylint<4
30
30
  Requires-Dist: pytest-xdist
31
31
  Requires-Dist: pytest-forked
32
32
  Requires-Dist: pytest>=5.0.0
@@ -145,6 +145,15 @@ License
145
145
 
146
146
  Release History
147
147
  ===============
148
+ 0.1.73
149
+ ++++++
150
+ * `azdev command-change meta-export`: Add `has_completer` to denote whether completer is configed in arg
151
+ * `azdev command-change meta-export`: Extracting arg help and example for loaded HelpFiles
152
+
153
+ 0.1.72
154
+ ++++++
155
+ * Bump `pylint` to 3
156
+
148
157
  0.1.71
149
158
  ++++++
150
159
  * `azdev extension show`: Show detailed extension info that installed in your development environment.
@@ -4,4 +4,4 @@
4
4
  # license information.
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __VERSION__ = '0.1.71'
7
+ __VERSION__ = '0.1.73'
@@ -4,7 +4,7 @@
4
4
  # license information.
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- # pylint: disable=no-else-return, too-many-nested-blocks
7
+ # pylint: disable=no-else-return, too-many-nested-blocks, too-many-locals, too-many-branches
8
8
 
9
9
  import time
10
10
 
@@ -72,6 +72,16 @@ def export_command_meta(modules=None, git_source=None, git_target=None, git_repo
72
72
  display('Commands loaded in {} sec'.format(stop - start))
73
73
  command_loader = az_cli.invocation.commands_loader
74
74
 
75
+ from azure.cli.core.file_util import get_all_help
76
+
77
+ help_info = {}
78
+ if with_help or with_example:
79
+ help_files = get_all_help(az_cli)
80
+ for help_item in help_files:
81
+ if not help_item.command:
82
+ continue
83
+ help_info[help_item.command] = help_item
84
+
75
85
  # trim command table to selected_modules
76
86
  command_loader = filter_modules(command_loader, modules=selected_mod_names)
77
87
 
@@ -85,7 +95,7 @@ def export_command_meta(modules=None, git_source=None, git_target=None, git_repo
85
95
  "name": command_name,
86
96
  "source": _get_command_source(command_name, command),
87
97
  "is_aaz": False,
88
- "help": command.help,
98
+ "help": help_info[command_name] if command_name in help_info else None,
89
99
  "confirmation": command.confirmation is True,
90
100
  "arguments": [],
91
101
  "az_arguments_schema": None,
@@ -119,6 +119,15 @@ def normalize_para_types(para):
119
119
  normalize_para_type(type_bool_opts, "bool")
120
120
 
121
121
 
122
+ def get_command_examples(command_info, command_meta):
123
+ example_items = []
124
+ if command_info and command_info.get("help", None) and hasattr(command_info["help"], "examples"):
125
+ for example_obj in command_info["help"].examples:
126
+ example_items.append({"name": example_obj.name, "text": example_obj.text})
127
+ if example_items:
128
+ command_meta["examples"] = example_items
129
+
130
+
122
131
  def gen_command_meta(command_info, with_help=False, with_example=False):
123
132
  stored_property_when_exist = ["confirmation", "supports_no_wait", "is_preview", "deprecate_info"]
124
133
  command_meta = {
@@ -129,15 +138,10 @@ def gen_command_meta(command_info, with_help=False, with_example=False):
129
138
  if command_info.get(prop, None):
130
139
  command_meta[prop] = command_info[prop]
131
140
  if with_example:
132
- try:
133
- command_meta["examples"] = command_info["help"]["examples"]
134
- except AttributeError:
135
- pass
141
+ get_command_examples(command_info, command_meta)
136
142
  if with_help:
137
- try:
138
- command_meta["desc"] = command_info["help"]["short-summary"]
139
- except AttributeError:
140
- pass
143
+ if command_info.get("help", None) and hasattr(command_info["help"], "short_summary"):
144
+ command_meta["desc"] = command_info["help"].short_summary
141
145
  parameters = []
142
146
  for _, argument in command_info["arguments"].items():
143
147
  if argument.type is None:
@@ -163,13 +167,15 @@ def gen_command_meta(command_info, with_help=False, with_example=False):
163
167
  para["id_part"] = settings["id_part"]
164
168
  if settings.get("nargs", None):
165
169
  para["nargs"] = settings["nargs"]
170
+ if settings.get("completer", None):
171
+ para["has_completer"] = True
166
172
  if settings.get("default", None):
167
173
  if not isinstance(settings["default"], (float, int, str, list, bool)):
168
174
  para["default"] = str(settings["default"])
169
175
  else:
170
176
  para["default"] = settings["default"]
171
177
  if with_help:
172
- para["desc"] = settings["help"]
178
+ para["desc"] = settings.get("help", "")
173
179
  if command_info["is_aaz"] and command_info["az_arguments_schema"]:
174
180
  process_aaz_argument(command_info["az_arguments_schema"], settings, para)
175
181
  normalize_para_types(para)
@@ -6,11 +6,9 @@
6
6
  import astroid
7
7
 
8
8
  from pylint.checkers import BaseChecker
9
- from pylint.interfaces import IAstroidChecker
10
9
 
11
10
 
12
11
  class ShowCommandChecker(BaseChecker):
13
- __implements__ = IAstroidChecker
14
12
 
15
13
  name = 'show-command'
16
14
  priority = -1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: azdev
3
- Version: 0.1.71
3
+ Version: 0.1.73
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
@@ -26,7 +26,7 @@ Requires-Dist: flake8
26
26
  Requires-Dist: gitpython
27
27
  Requires-Dist: jinja2
28
28
  Requires-Dist: knack
29
- Requires-Dist: pylint<3,>=2.12
29
+ Requires-Dist: pylint<4
30
30
  Requires-Dist: pytest-xdist
31
31
  Requires-Dist: pytest-forked
32
32
  Requires-Dist: pytest>=5.0.0
@@ -145,6 +145,15 @@ License
145
145
 
146
146
  Release History
147
147
  ===============
148
+ 0.1.73
149
+ ++++++
150
+ * `azdev command-change meta-export`: Add `has_completer` to denote whether completer is configed in arg
151
+ * `azdev command-change meta-export`: Extracting arg help and example for loaded HelpFiles
152
+
153
+ 0.1.72
154
+ ++++++
155
+ * Bump `pylint` to 3
156
+
148
157
  0.1.71
149
158
  ++++++
150
159
  * `azdev extension show`: Show detailed extension info that installed in your development environment.
@@ -4,7 +4,7 @@ flake8
4
4
  gitpython
5
5
  jinja2
6
6
  knack
7
- pylint<3,>=2.12
7
+ pylint<4
8
8
  pytest-xdist
9
9
  pytest-forked
10
10
  pytest>=5.0.0
@@ -72,7 +72,7 @@ setup(
72
72
  'gitpython',
73
73
  'jinja2',
74
74
  'knack',
75
- 'pylint>=2.12,<3',
75
+ 'pylint<4',
76
76
  'pytest-xdist', # depends on pytest-forked
77
77
  'pytest-forked',
78
78
  'pytest>=5.0.0',
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