From f2f84664edf9ee4306319da2206aec25c030a6b6 Mon Sep 17 00:00:00 2001 From: Catalina Peralta Date: Mon, 3 Jun 2024 17:35:38 -0700 Subject: [PATCH 01/11] wip - support non-breaking changes --- .../breaking_changes_tracker.py | 106 +++++++++++++++++- .../detect_breaking_changes.py | 14 +-- 2 files changed, 112 insertions(+), 8 deletions(-) diff --git a/scripts/breaking_changes_checker/breaking_changes_tracker.py b/scripts/breaking_changes_checker/breaking_changes_tracker.py index 80199cbe152c..9a6411f58296 100644 --- a/scripts/breaking_changes_checker/breaking_changes_tracker.py +++ b/scripts/breaking_changes_checker/breaking_changes_tracker.py @@ -29,6 +29,11 @@ class BreakingChangeType(str, Enum): REMOVED_OR_RENAMED_MODULE = "RemovedOrRenamedModule" REMOVED_FUNCTION_KWARGS = "RemovedFunctionKwargs" + # ----------------- General Changes ----------------- + ADDED_CLIENT = "AddedClient" + ADDED_CLIENT_METHOD = "AddedClientMethod" + ADDED_CLASS = "AddedClass" + ADDED_CLASS_METHOD = "AddedClassMethod" class BreakingChangesTracker: REMOVED_OR_RENAMED_CLIENT_MSG = \ @@ -88,11 +93,23 @@ class BreakingChangesTracker: "({}): The function '{}.{}' changed from accepting keyword arguments to not accepting them in " \ "the current version" + # ----------------- General Changes ----------------- + ADDED_CLIENT_MSG = \ + "({}): The client '{}.{}' was added in the current version" + ADDED_CLIENT_METHOD_MSG = \ + "({}): The '{}.{}' client method '{}' was added in the current version" + ADDED_CLASS_MSG = \ + "({}): The model or publicly exposed class '{}.{}' was added in the current version" + ADDED_CLASS_METHOD_MSG = \ + "({}): The '{}.{}' method '{}' was added in the current version" + + def __init__(self, stable: Dict, current: Dict, diff: Dict, package_name: str, **kwargs: Any) -> None: self.stable = stable self.current = current self.diff = diff self.breaking_changes = [] + self.features_added = [] self.package_name = package_name self.module_name = None self.class_name = None @@ -102,6 +119,9 @@ def __init__(self, stable: Dict, current: Dict, diff: Dict, package_name: str, * def __str__(self): formatted = "\n" + for fa in self.features_added: + formatted += fa + "\n" + for bc in self.breaking_changes: formatted += bc + "\n" @@ -110,6 +130,8 @@ def __str__(self): return formatted def run_checks(self) -> None: + # TODO: this should be conditional based on what folks want reported + self.run_non_breaking_change_diff_checks() self.run_breaking_change_diff_checks() self.check_parameter_ordering() # not part of diff self.report_breaking_changes() @@ -127,6 +149,62 @@ def run_breaking_change_diff_checks(self) -> None: self.run_class_level_diff_checks(module) self.run_function_level_diff_checks(module) + def run_non_breaking_change_diff_checks(self) -> None: + for module_name, module in self.diff.items(): + self.module_name = module_name + if self.module_name not in self.stable and not isinstance(self.module_name, jsondiff.Symbol): + continue # TODO add this to reported changes + + self.run_non_breaking_class_level_diff_checks(module) + + def run_non_breaking_class_level_diff_checks(self, module: Dict) -> None: + for class_name, class_components in module.get("class_nodes", {}).items(): + self.class_name = class_name + stable_class_nodes = self.stable[self.module_name]["class_nodes"] + if not isinstance(class_name, jsondiff.Symbol): + if self.class_name not in stable_class_nodes: + if self.class_name.endswith("Client"): + # This is a new client + fa = ( + self.ADDED_CLIENT_MSG, + BreakingChangeType.ADDED_CLIENT, + self.module_name, class_name + ) + self.features_added.append(fa) + else: + # This is a new class + fa = ( + self.ADDED_CLASS_MSG, + BreakingChangeType.ADDED_CLASS, + self.module_name, class_name + ) + self.features_added.append(fa) + else: + # Check existing class for new methods + stable_methods_node = stable_class_nodes[self.class_name]["methods"] + for method_name, method_components in class_components.get("methods", {}).items(): + self.function_name = method_name + # current_methods_node = self.current[self.module_name]["class_nodes"][self.class_name]["methods"] + if self.function_name not in stable_methods_node and \ + not isinstance(self.function_name, jsondiff.Symbol): + if self.class_name.endswith("Client"): + # This is a new client method + fa = ( + self.ADDED_CLIENT_METHOD_MSG, + BreakingChangeType.ADDED_CLIENT_METHOD, + self.module_name, self.class_name, method_name + ) + self.features_added.append(fa) + else: + # This is a new class method + fa = ( + self.ADDED_CLASS_METHOD_MSG, + BreakingChangeType.ADDED_CLASS_METHOD, + self.module_name, class_name, method_name + ) + self.features_added.append(fa) + + def run_class_level_diff_checks(self, module: Dict) -> None: for class_name, class_components in module.get("class_nodes", {}).items(): self.class_name = class_name @@ -568,6 +646,7 @@ def check_module_level_function_removed_or_renamed(self, function_components: Di ) return True + # ----------------------------------- Report methods ----------------------------------- def get_reportable_breaking_changes(self, ignore_changes: Dict) -> List: reportable_changes = [] ignored = ignore_changes[self.package_name] @@ -582,7 +661,27 @@ def get_reportable_breaking_changes(self, ignore_changes: Dict) -> List: reportable_changes.append(bc) return reportable_changes - def report_breaking_changes(self) -> None: + def report_changelog(self) -> None: + def _build_md(content, title, buffer): + buffer.append(title) + buffer.append("") + for _, bc in enumerate(content): + msg, *args = bc + buffer.append(msg.format(*args)) + buffer.append("") + return buffer + + buffer = [] + _build_md([], "# Release history", buffer) + _build_md([], f"## current", buffer) + _build_md(self.breaking_changes, "### Breaking Changes", buffer) + _build_md(self.features_added, "### Features Added", buffer) + content = "\n".join(buffer).strip() + with open("changelog.md", "rw") as fd: + content.append(fd.read()) + fd.write(content) + + def report_breaking_changes(self, changelog: bool = False) -> None: ignore_changes = self.ignore if self.ignore else IGNORE_BREAKING_CHANGES if self.package_name in ignore_changes: self.breaking_changes = self.get_reportable_breaking_changes(ignore_changes) @@ -590,3 +689,8 @@ def report_breaking_changes(self) -> None: for idx, bc in enumerate(self.breaking_changes): msg, *args = bc self.breaking_changes[idx] = msg.format(*args) + + # TODO - need to do this separately for changelog + for idx, fa in enumerate(self.features_added): + msg, *args = fa + self.features_added[idx] = msg.format(*args) \ No newline at end of file diff --git a/scripts/breaking_changes_checker/detect_breaking_changes.py b/scripts/breaking_changes_checker/detect_breaking_changes.py index d9a0f4d67151..d9ddce43fe3e 100644 --- a/scripts/breaking_changes_checker/detect_breaking_changes.py +++ b/scripts/breaking_changes_checker/detect_breaking_changes.py @@ -274,9 +274,9 @@ def test_compare_reports(pkg_dir: str, version: str) -> None: bc = BreakingChangesTracker(stable, current, diff, package_name) bc.run_checks() - remove_json_files(pkg_dir) + # remove_json_files(pkg_dir) - if bc.breaking_changes: + if bc.features_added or bc.breaking_changes: print(bc) exit(1) @@ -344,7 +344,7 @@ def main(package_name: str, target_module: str, version: str, in_venv: Union[boo except Exception as err: # catch any issues with capturing the public API and building the report print("\n*****See aka.ms/azsdk/breaking-changes-tool to resolve any build issues*****\n") - remove_json_files(pkg_dir) + # remove_json_files(pkg_dir) raise err @@ -391,10 +391,10 @@ def main(package_name: str, target_module: str, version: str, in_venv: Union[boo pkg_dir = os.path.abspath(args.target_package) package_name = os.path.basename(pkg_dir) logging.basicConfig(level=logging.INFO) - if package_name not in RUN_BREAKING_CHANGES_PACKAGES: - _LOGGER.info(f"{package_name} opted out of breaking changes checks. " - f"See http://aka.ms/azsdk/breaking-changes-tool to opt-in.") - exit(0) + # if package_name not in RUN_BREAKING_CHANGES_PACKAGES: + # _LOGGER.info(f"{package_name} opted out of breaking changes checks. " + # f"See http://aka.ms/azsdk/breaking-changes-tool to opt-in.") + # exit(0) if not target_module: from ci_tools.parsing import ParsedSetup From 6a3185188b6f731112d477c6cd2b3f0bb935c02b Mon Sep 17 00:00:00 2001 From: Catalina Peralta Date: Mon, 3 Jun 2024 21:47:45 -0700 Subject: [PATCH 02/11] refactor to support changelog functionality --- .../breaking_changes_tracker.py | 88 +++++++++---------- 1 file changed, 41 insertions(+), 47 deletions(-) diff --git a/scripts/breaking_changes_checker/breaking_changes_tracker.py b/scripts/breaking_changes_checker/breaking_changes_tracker.py index 9a6411f58296..c2d70172c160 100644 --- a/scripts/breaking_changes_checker/breaking_changes_tracker.py +++ b/scripts/breaking_changes_checker/breaking_changes_tracker.py @@ -37,71 +37,71 @@ class BreakingChangeType(str, Enum): class BreakingChangesTracker: REMOVED_OR_RENAMED_CLIENT_MSG = \ - "({}): The client '{}.{}' was deleted or renamed in the current version" + "The client '{}.{}' was deleted or renamed in the current version" REMOVED_OR_RENAMED_CLIENT_METHOD_MSG = \ - "({}): The '{}.{}' client method '{}' was deleted or renamed in the current version" + "The '{}.{}' client method '{}' was deleted or renamed in the current version" REMOVED_OR_RENAMED_CLASS_MSG = \ - "({}): The model or publicly exposed class '{}.{}' was deleted or renamed in the current version" + "The model or publicly exposed class '{}.{}' was deleted or renamed in the current version" REMOVED_OR_RENAMED_CLASS_METHOD_MSG = \ - "({}): The '{}.{}' method '{}' was deleted or renamed in the current version" + "The '{}.{}' method '{}' was deleted or renamed in the current version" REMOVED_OR_RENAMED_MODULE_LEVEL_FUNCTION_MSG = \ - "({}): The publicly exposed function '{}.{}' was deleted or renamed in the current version" + "The publicly exposed function '{}.{}' was deleted or renamed in the current version" REMOVED_OR_RENAMED_POSITIONAL_PARAM_OF_METHOD_MSG = \ - "({}): The '{}.{} method '{}' had its '{}' parameter '{}' deleted or renamed in the current version" + "The '{}.{} method '{}' had its '{}' parameter '{}' deleted or renamed in the current version" REMOVED_OR_RENAMED_POSITIONAL_PARAM_OF_FUNCTION_MSG = \ - "({}): The function '{}.{}' had its '{}' parameter '{}' deleted or renamed in the current version" + "The function '{}.{}' had its '{}' parameter '{}' deleted or renamed in the current version" ADDED_POSITIONAL_PARAM_TO_METHOD_MSG = \ - "({}): The '{}.{} method '{}' had a '{}' parameter '{}' inserted in the current version" + "The '{}.{} method '{}' had a '{}' parameter '{}' inserted in the current version" ADDED_POSITIONAL_PARAM_TO_FUNCTION_MSG = \ - "({}): The function '{}.{}' had a '{}' parameter '{}' inserted in the current version" + "The function '{}.{}' had a '{}' parameter '{}' inserted in the current version" REMOVED_OR_RENAMED_INSTANCE_ATTRIBUTE_FROM_CLIENT_MSG = \ - "({}): The client '{}.{}' had its instance variable '{}' deleted or renamed in the current version" + "The client '{}.{}' had its instance variable '{}' deleted or renamed in the current version" REMOVED_OR_RENAMED_INSTANCE_ATTRIBUTE_FROM_MODEL_MSG = \ - "({}): The model or publicly exposed class '{}.{}' had its instance variable '{}' deleted or renamed " \ + "The model or publicly exposed class '{}.{}' had its instance variable '{}' deleted or renamed " \ "in the current version" REMOVED_OR_RENAMED_ENUM_VALUE_MSG = \ - "({}): The '{}.{}' enum had its value '{}' deleted or renamed in the current version" + "The '{}.{}' enum had its value '{}' deleted or renamed in the current version" CHANGED_PARAMETER_DEFAULT_VALUE_MSG = \ - "({}): The class '{}.{}' method '{}' had its parameter '{}' default value changed from '{}' to '{}'" + "The class '{}.{}' method '{}' had its parameter '{}' default value changed from '{}' to '{}'" CHANGED_PARAMETER_DEFAULT_VALUE_OF_FUNCTION_MSG = \ - "({}): The publicly exposed function '{}.{}' had its parameter '{}' default value changed from '{}' to '{}'" + "The publicly exposed function '{}.{}' had its parameter '{}' default value changed from '{}' to '{}'" REMOVED_PARAMETER_DEFAULT_VALUE_MSG = \ - "({}): The class '{}.{}' method '{}' had default value '{}' removed from its parameter '{}' in " \ + "The class '{}.{}' method '{}' had default value '{}' removed from its parameter '{}' in " \ "the current version" REMOVED_PARAMETER_DEFAULT_VALUE_OF_FUNCTION_MSG = \ - "({}): The publicly exposed function '{}.{}' had default value '{}' removed from its parameter '{}' in " \ + "The publicly exposed function '{}.{}' had default value '{}' removed from its parameter '{}' in " \ "the current version" CHANGED_PARAMETER_ORDERING_MSG = \ - "({}): The class '{}.{}' method '{}' had its parameters re-ordered from '{}' to '{}' in the current version" + "The class '{}.{}' method '{}' had its parameters re-ordered from '{}' to '{}' in the current version" CHANGED_PARAMETER_ORDERING_OF_FUNCTION_MSG = \ - "({}): The publicly exposed function '{}.{}' had its parameters re-ordered from '{}' to '{}' in " \ + "The publicly exposed function '{}.{}' had its parameters re-ordered from '{}' to '{}' in " \ "the current version" CHANGED_PARAMETER_KIND_MSG = \ - "({}): The class '{}.{}' method '{}' had its parameter '{}' changed from '{}' to '{}' in the current version" + "The class '{}.{}' method '{}' had its parameter '{}' changed from '{}' to '{}' in the current version" CHANGED_PARAMETER_KIND_OF_FUNCTION_MSG = \ - "({}): The function '{}.{}' had its parameter '{}' changed from '{}' to '{}' in the current version" + "The function '{}.{}' had its parameter '{}' changed from '{}' to '{}' in the current version" CHANGED_CLASS_FUNCTION_KIND_MSG = \ - "({}): The class '{}.{}' method '{}' changed from '{}' to '{}' in the current version." + "The class '{}.{}' method '{}' changed from '{}' to '{}' in the current version." CHANGED_FUNCTION_KIND_MSG = \ - "({}): The function '{}.{}' changed from '{}' to '{}' in the current version." + "The function '{}.{}' changed from '{}' to '{}' in the current version." REMOVED_OR_RENAMED_MODULE_MSG = \ - "({}): The '{}' module was deleted or renamed in the current version" + "The '{}' module was deleted or renamed in the current version" REMOVED_CLASS_FUNCTION_KWARGS_MSG = \ - "({}): The class '{}.{}' method '{}' changed from accepting keyword arguments to not accepting them in " \ + "The class '{}.{}' method '{}' changed from accepting keyword arguments to not accepting them in " \ "the current version" REMOVED_FUNCTION_KWARGS_MSG = \ - "({}): The function '{}.{}' changed from accepting keyword arguments to not accepting them in " \ + "The function '{}.{}' changed from accepting keyword arguments to not accepting them in " \ "the current version" # ----------------- General Changes ----------------- ADDED_CLIENT_MSG = \ - "({}): The client '{}.{}' was added in the current version" + "The client '{}.{}' was added in the current version" ADDED_CLIENT_METHOD_MSG = \ - "({}): The '{}.{}' client method '{}' was added in the current version" + "The '{}.{}' client method '{}' was added in the current version" ADDED_CLASS_MSG = \ - "({}): The model or publicly exposed class '{}.{}' was added in the current version" + "The model or publicly exposed class '{}.{}' was added in the current version" ADDED_CLASS_METHOD_MSG = \ - "({}): The '{}.{}' method '{}' was added in the current version" + "The '{}.{}' method '{}' was added in the current version" def __init__(self, stable: Dict, current: Dict, diff: Dict, package_name: str, **kwargs: Any) -> None: @@ -119,8 +119,6 @@ def __init__(self, stable: Dict, current: Dict, diff: Dict, package_name: str, * def __str__(self): formatted = "\n" - for fa in self.features_added: - formatted += fa + "\n" for bc in self.breaking_changes: formatted += bc + "\n" @@ -134,7 +132,6 @@ def run_checks(self) -> None: self.run_non_breaking_change_diff_checks() self.run_breaking_change_diff_checks() self.check_parameter_ordering() # not part of diff - self.report_breaking_changes() def run_breaking_change_diff_checks(self) -> None: for module_name, module in self.diff.items(): @@ -662,35 +659,32 @@ def get_reportable_breaking_changes(self, ignore_changes: Dict) -> List: return reportable_changes def report_changelog(self) -> None: - def _build_md(content, title, buffer): + # Code borrowed and modified from the previous change log tool + def _build_md(content: list, title: str, buffer: list): buffer.append(title) buffer.append("") for _, bc in enumerate(content): - msg, *args = bc + msg, _, *args = bc buffer.append(msg.format(*args)) buffer.append("") return buffer buffer = [] - _build_md([], "# Release history", buffer) - _build_md([], f"## current", buffer) - _build_md(self.breaking_changes, "### Breaking Changes", buffer) - _build_md(self.features_added, "### Features Added", buffer) + + if self.breaking_changes: + _build_md(self.breaking_changes, "### Breaking Changes", buffer) + if self.features_added: + _build_md(self.features_added, "### Features Added", buffer) content = "\n".join(buffer).strip() - with open("changelog.md", "rw") as fd: - content.append(fd.read()) - fd.write(content) + return content - def report_breaking_changes(self, changelog: bool = False) -> None: + def report_breaking_changes(self) -> None: ignore_changes = self.ignore if self.ignore else IGNORE_BREAKING_CHANGES if self.package_name in ignore_changes: self.breaking_changes = self.get_reportable_breaking_changes(ignore_changes) for idx, bc in enumerate(self.breaking_changes): msg, *args = bc + # For simple breaking changes reporting, prepend the change code to the message + msg = "({}): " + msg self.breaking_changes[idx] = msg.format(*args) - - # TODO - need to do this separately for changelog - for idx, fa in enumerate(self.features_added): - msg, *args = fa - self.features_added[idx] = msg.format(*args) \ No newline at end of file From bd268ee45c7640b84872ee7a838a21b48b34008c Mon Sep 17 00:00:00 2001 From: Catalina Peralta Date: Mon, 3 Jun 2024 21:48:42 -0700 Subject: [PATCH 03/11] print changelog or breaking changes --- .../detect_breaking_changes.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/breaking_changes_checker/detect_breaking_changes.py b/scripts/breaking_changes_checker/detect_breaking_changes.py index d9ddce43fe3e..6559c98049a4 100644 --- a/scripts/breaking_changes_checker/detect_breaking_changes.py +++ b/scripts/breaking_changes_checker/detect_breaking_changes.py @@ -274,9 +274,15 @@ def test_compare_reports(pkg_dir: str, version: str) -> None: bc = BreakingChangesTracker(stable, current, diff, package_name) bc.run_checks() - # remove_json_files(pkg_dir) - - if bc.features_added or bc.breaking_changes: + remove_json_files(pkg_dir) + + # TODO: Add changelog argument to the script + changelog = True + if changelog: + print(bc.report_changelog()) + exit(0) + elif bc.breaking_changes: + bc.report_breaking_changes() print(bc) exit(1) From 6c435d5b7792c7c887e16aaa3ce29b1493ce55e6 Mon Sep 17 00:00:00 2001 From: Catalina Peralta Date: Mon, 10 Jun 2024 10:55:58 -0700 Subject: [PATCH 04/11] support changelog flag --- eng/tox/tox.ini | 2 +- .../detect_breaking_changes.py | 20 +++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/eng/tox/tox.ini b/eng/tox/tox.ini index 21d64080d93f..a79417bbab9a 100644 --- a/eng/tox/tox.ini +++ b/eng/tox/tox.ini @@ -558,7 +558,7 @@ commands = -p {tox_root} \ -w {envtmpdir} \ --package-type sdist - python {repository_root}/scripts/breaking_changes_checker/detect_breaking_changes.py -t {tox_root} + python {repository_root}/scripts/breaking_changes_checker/detect_breaking_changes.py -t {tox_root} {posargs} [testenv:black] diff --git a/scripts/breaking_changes_checker/detect_breaking_changes.py b/scripts/breaking_changes_checker/detect_breaking_changes.py index f6eaeddfe2b1..b983fcb169d0 100644 --- a/scripts/breaking_changes_checker/detect_breaking_changes.py +++ b/scripts/breaking_changes_checker/detect_breaking_changes.py @@ -266,7 +266,7 @@ def build_library_report(target_module: str) -> Dict: return public_api -def test_compare_reports(pkg_dir: str, version: str) -> None: +def test_compare_reports(pkg_dir: str, version: str, changelog: bool) -> None: package_name = os.path.basename(pkg_dir) with open(os.path.join(pkg_dir, "stable.json"), "r") as fd: @@ -280,8 +280,6 @@ def test_compare_reports(pkg_dir: str, version: str) -> None: remove_json_files(pkg_dir) - # TODO: Add changelog argument to the script - changelog = True if changelog: print(bc.report_changelog()) exit(0) @@ -303,7 +301,7 @@ def remove_json_files(pkg_dir: str) -> None: _LOGGER.info("cleaning up") -def main(package_name: str, target_module: str, version: str, in_venv: Union[bool, str], pkg_dir: str): +def main(package_name: str, target_module: str, version: str, in_venv: Union[bool, str], pkg_dir: str, changelog: bool): in_venv = True if in_venv == "true" else False # subprocess sends back string so convert to bool if not in_venv: @@ -350,7 +348,7 @@ def main(package_name: str, target_module: str, version: str, in_venv: Union[boo json.dump(public_api, fd, indent=2) _LOGGER.info("current.json is written.") - test_compare_reports(pkg_dir, version) + test_compare_reports(pkg_dir, version, changelog) except Exception as err: # catch any issues with capturing the public API and building the report print("\n*****See aka.ms/azsdk/breaking-changes-tool to resolve any build issues*****\n") @@ -394,12 +392,22 @@ def main(package_name: str, target_module: str, version: str, in_venv: Union[boo default=None ) + parser.add_argument( + "-c", + "--changelog", + dest="changelog", + help="Output changes listed in changelog format.", + action="store_true", + default=False, + ) + args = parser.parse_args() in_venv = args.in_venv stable_version = args.stable_version target_module = args.target_module pkg_dir = os.path.abspath(args.target_package) package_name = os.path.basename(pkg_dir) + changelog = args.changelog logging.basicConfig(level=logging.INFO) # if package_name not in RUN_BREAKING_CHANGES_PACKAGES: # _LOGGER.info(f"{package_name} opted out of breaking changes checks. " @@ -422,4 +430,4 @@ def main(package_name: str, target_module: str, version: str, in_venv: Union[boo _LOGGER.warning(f"No stable version for {package_name} on PyPi. Exiting...") exit(0) - main(package_name, target_module, stable_version, in_venv, pkg_dir) + main(package_name, target_module, stable_version, in_venv, pkg_dir, changelog) From ee2b51b85a1d666d9e21e59e79f6835d1ee6afc4 Mon Sep 17 00:00:00 2001 From: Catalina Peralta Date: Mon, 10 Jun 2024 11:56:01 -0700 Subject: [PATCH 05/11] changelog fix --- scripts/breaking_changes_checker/breaking_changes_tracker.py | 5 +++-- scripts/breaking_changes_checker/detect_breaking_changes.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/breaking_changes_checker/breaking_changes_tracker.py b/scripts/breaking_changes_checker/breaking_changes_tracker.py index c2d70172c160..c9236f078361 100644 --- a/scripts/breaking_changes_checker/breaking_changes_tracker.py +++ b/scripts/breaking_changes_checker/breaking_changes_tracker.py @@ -116,6 +116,7 @@ def __init__(self, stable: Dict, current: Dict, diff: Dict, package_name: str, * self.function_name = None self.parameter_name = None self.ignore = kwargs.get("ignore", None) + self.changelog = kwargs.get("changelog", False) def __str__(self): formatted = "\n" @@ -128,8 +129,8 @@ def __str__(self): return formatted def run_checks(self) -> None: - # TODO: this should be conditional based on what folks want reported - self.run_non_breaking_change_diff_checks() + if self.changelog: + self.run_non_breaking_change_diff_checks() self.run_breaking_change_diff_checks() self.check_parameter_ordering() # not part of diff diff --git a/scripts/breaking_changes_checker/detect_breaking_changes.py b/scripts/breaking_changes_checker/detect_breaking_changes.py index b983fcb169d0..14211907d989 100644 --- a/scripts/breaking_changes_checker/detect_breaking_changes.py +++ b/scripts/breaking_changes_checker/detect_breaking_changes.py @@ -275,7 +275,7 @@ def test_compare_reports(pkg_dir: str, version: str, changelog: bool) -> None: current = json.load(fd) diff = jsondiff.diff(stable, current) - bc = BreakingChangesTracker(stable, current, diff, package_name) + bc = BreakingChangesTracker(stable, current, diff, package_name, changelog=changelog) bc.run_checks() remove_json_files(pkg_dir) From 7f2d2de8e477b9dce7a5bb03a8fcdd301f689d2d Mon Sep 17 00:00:00 2001 From: Catalina Peralta Date: Tue, 11 Jun 2024 17:18:58 -0700 Subject: [PATCH 06/11] ignore unknown args --- .../detect_breaking_changes.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/breaking_changes_checker/detect_breaking_changes.py b/scripts/breaking_changes_checker/detect_breaking_changes.py index 14211907d989..ada0b3ad0361 100644 --- a/scripts/breaking_changes_checker/detect_breaking_changes.py +++ b/scripts/breaking_changes_checker/detect_breaking_changes.py @@ -401,7 +401,10 @@ def main(package_name: str, target_module: str, version: str, in_venv: Union[boo default=False, ) - args = parser.parse_args() + args, unknown = parser.parse_known_args() + if unknown: + _LOGGER.info(f"Ignoring unknown arguments: {unknown}") + in_venv = args.in_venv stable_version = args.stable_version target_module = args.target_module @@ -409,10 +412,10 @@ def main(package_name: str, target_module: str, version: str, in_venv: Union[boo package_name = os.path.basename(pkg_dir) changelog = args.changelog logging.basicConfig(level=logging.INFO) - # if package_name not in RUN_BREAKING_CHANGES_PACKAGES: - # _LOGGER.info(f"{package_name} opted out of breaking changes checks. " - # f"See http://aka.ms/azsdk/breaking-changes-tool to opt-in.") - # exit(0) + if package_name not in RUN_BREAKING_CHANGES_PACKAGES: + _LOGGER.info(f"{package_name} opted out of breaking changes checks. " + f"See http://aka.ms/azsdk/breaking-changes-tool to opt-in.") + exit(0) if not target_module: from ci_tools.parsing import ParsedSetup From 2335a1022bb79cdfc2913a7840f0d96b805e24e8 Mon Sep 17 00:00:00 2001 From: Catalina Peralta Date: Tue, 11 Jun 2024 17:24:24 -0700 Subject: [PATCH 07/11] change enum --- .../breaking_changes_tracker.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/scripts/breaking_changes_checker/breaking_changes_tracker.py b/scripts/breaking_changes_checker/breaking_changes_tracker.py index c9236f078361..96accfe492c2 100644 --- a/scripts/breaking_changes_checker/breaking_changes_tracker.py +++ b/scripts/breaking_changes_checker/breaking_changes_tracker.py @@ -18,7 +18,6 @@ class BreakingChangeType(str, Enum): REMOVED_OR_RENAMED_CLASS_METHOD = "RemovedOrRenamedClassMethod" REMOVED_OR_RENAMED_MODULE_LEVEL_FUNCTION = "RemovedOrRenamedModuleLevelFunction" REMOVED_OR_RENAMED_POSITIONAL_PARAM = "RemovedOrRenamedPositionalParam" - ADDED_POSITIONAL_PARAM = "AddedPositionalParam" REMOVED_PARAMETER_DEFAULT_VALUE = "RemovedParameterDefaultValue" REMOVED_OR_RENAMED_INSTANCE_ATTRIBUTE = "RemovedOrRenamedInstanceAttribute" REMOVED_OR_RENAMED_ENUM_VALUE = "RemovedOrRenamedEnumValue" @@ -29,11 +28,13 @@ class BreakingChangeType(str, Enum): REMOVED_OR_RENAMED_MODULE = "RemovedOrRenamedModule" REMOVED_FUNCTION_KWARGS = "RemovedFunctionKwargs" - # ----------------- General Changes ----------------- +# General non-breaking changes +class ChangeType(str, Enum): ADDED_CLIENT = "AddedClient" ADDED_CLIENT_METHOD = "AddedClientMethod" ADDED_CLASS = "AddedClass" ADDED_CLASS_METHOD = "AddedClassMethod" + ADDED_POSITIONAL_PARAM = "AddedPositionalParam" class BreakingChangesTracker: REMOVED_OR_RENAMED_CLIENT_MSG = \ @@ -165,7 +166,7 @@ def run_non_breaking_class_level_diff_checks(self, module: Dict) -> None: # This is a new client fa = ( self.ADDED_CLIENT_MSG, - BreakingChangeType.ADDED_CLIENT, + ChangeType.ADDED_CLIENT, self.module_name, class_name ) self.features_added.append(fa) @@ -173,7 +174,7 @@ def run_non_breaking_class_level_diff_checks(self, module: Dict) -> None: # This is a new class fa = ( self.ADDED_CLASS_MSG, - BreakingChangeType.ADDED_CLASS, + ChangeType.ADDED_CLASS, self.module_name, class_name ) self.features_added.append(fa) @@ -189,7 +190,7 @@ def run_non_breaking_class_level_diff_checks(self, module: Dict) -> None: # This is a new client method fa = ( self.ADDED_CLIENT_METHOD_MSG, - BreakingChangeType.ADDED_CLIENT_METHOD, + ChangeType.ADDED_CLIENT_METHOD, self.module_name, self.class_name, method_name ) self.features_added.append(fa) @@ -197,7 +198,7 @@ def run_non_breaking_class_level_diff_checks(self, module: Dict) -> None: # This is a new class method fa = ( self.ADDED_CLASS_METHOD_MSG, - BreakingChangeType.ADDED_CLASS_METHOD, + ChangeType.ADDED_CLASS_METHOD, self.module_name, class_name, method_name ) self.features_added.append(fa) @@ -490,7 +491,7 @@ def check_positional_parameter_added(self, current_parameters_node: Dict) -> Non if self.class_name: self.breaking_changes.append( ( - self.ADDED_POSITIONAL_PARAM_TO_METHOD_MSG, BreakingChangeType.ADDED_POSITIONAL_PARAM, + self.ADDED_POSITIONAL_PARAM_TO_METHOD_MSG, ChangeType.ADDED_POSITIONAL_PARAM, self.module_name, self.class_name, self.function_name, current_parameters_node["param_type"], self.parameter_name ) @@ -498,7 +499,7 @@ def check_positional_parameter_added(self, current_parameters_node: Dict) -> Non else: self.breaking_changes.append( ( - self.ADDED_POSITIONAL_PARAM_TO_FUNCTION_MSG, BreakingChangeType.ADDED_POSITIONAL_PARAM, + self.ADDED_POSITIONAL_PARAM_TO_FUNCTION_MSG, ChangeType.ADDED_POSITIONAL_PARAM, self.module_name, self.function_name, current_parameters_node["param_type"], self.parameter_name ) From b9d7c2c1a33fb0af10e9fa2c46c3618c33998822 Mon Sep 17 00:00:00 2001 From: Catalina Peralta Date: Tue, 11 Jun 2024 17:27:30 -0700 Subject: [PATCH 08/11] undo positional param change --- .../breaking_changes_checker/breaking_changes_tracker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/breaking_changes_checker/breaking_changes_tracker.py b/scripts/breaking_changes_checker/breaking_changes_tracker.py index 96accfe492c2..49bab39262ad 100644 --- a/scripts/breaking_changes_checker/breaking_changes_tracker.py +++ b/scripts/breaking_changes_checker/breaking_changes_tracker.py @@ -18,6 +18,7 @@ class BreakingChangeType(str, Enum): REMOVED_OR_RENAMED_CLASS_METHOD = "RemovedOrRenamedClassMethod" REMOVED_OR_RENAMED_MODULE_LEVEL_FUNCTION = "RemovedOrRenamedModuleLevelFunction" REMOVED_OR_RENAMED_POSITIONAL_PARAM = "RemovedOrRenamedPositionalParam" + ADDED_POSITIONAL_PARAM = "AddedPositionalParam" REMOVED_PARAMETER_DEFAULT_VALUE = "RemovedParameterDefaultValue" REMOVED_OR_RENAMED_INSTANCE_ATTRIBUTE = "RemovedOrRenamedInstanceAttribute" REMOVED_OR_RENAMED_ENUM_VALUE = "RemovedOrRenamedEnumValue" @@ -34,7 +35,6 @@ class ChangeType(str, Enum): ADDED_CLIENT_METHOD = "AddedClientMethod" ADDED_CLASS = "AddedClass" ADDED_CLASS_METHOD = "AddedClassMethod" - ADDED_POSITIONAL_PARAM = "AddedPositionalParam" class BreakingChangesTracker: REMOVED_OR_RENAMED_CLIENT_MSG = \ @@ -491,7 +491,7 @@ def check_positional_parameter_added(self, current_parameters_node: Dict) -> Non if self.class_name: self.breaking_changes.append( ( - self.ADDED_POSITIONAL_PARAM_TO_METHOD_MSG, ChangeType.ADDED_POSITIONAL_PARAM, + self.ADDED_POSITIONAL_PARAM_TO_METHOD_MSG, BreakingChangeType.ADDED_POSITIONAL_PARAM, self.module_name, self.class_name, self.function_name, current_parameters_node["param_type"], self.parameter_name ) @@ -499,7 +499,7 @@ def check_positional_parameter_added(self, current_parameters_node: Dict) -> Non else: self.breaking_changes.append( ( - self.ADDED_POSITIONAL_PARAM_TO_FUNCTION_MSG, ChangeType.ADDED_POSITIONAL_PARAM, + self.ADDED_POSITIONAL_PARAM_TO_FUNCTION_MSG, BreakingChangeType.ADDED_POSITIONAL_PARAM, self.module_name, self.function_name, current_parameters_node["param_type"], self.parameter_name ) From 8a4da497d0702cbd9e0e28c2fcb9f6cd7939d3b8 Mon Sep 17 00:00:00 2001 From: Catalina Peralta Date: Tue, 11 Jun 2024 17:40:20 -0700 Subject: [PATCH 09/11] cleanup --- scripts/breaking_changes_checker/breaking_changes_tracker.py | 2 -- scripts/breaking_changes_checker/detect_breaking_changes.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/breaking_changes_checker/breaking_changes_tracker.py b/scripts/breaking_changes_checker/breaking_changes_tracker.py index 49bab39262ad..1d829d94dd2d 100644 --- a/scripts/breaking_changes_checker/breaking_changes_tracker.py +++ b/scripts/breaking_changes_checker/breaking_changes_tracker.py @@ -121,7 +121,6 @@ def __init__(self, stable: Dict, current: Dict, diff: Dict, package_name: str, * def __str__(self): formatted = "\n" - for bc in self.breaking_changes: formatted += bc + "\n" @@ -183,7 +182,6 @@ def run_non_breaking_class_level_diff_checks(self, module: Dict) -> None: stable_methods_node = stable_class_nodes[self.class_name]["methods"] for method_name, method_components in class_components.get("methods", {}).items(): self.function_name = method_name - # current_methods_node = self.current[self.module_name]["class_nodes"][self.class_name]["methods"] if self.function_name not in stable_methods_node and \ not isinstance(self.function_name, jsondiff.Symbol): if self.class_name.endswith("Client"): diff --git a/scripts/breaking_changes_checker/detect_breaking_changes.py b/scripts/breaking_changes_checker/detect_breaking_changes.py index ada0b3ad0361..9f81ffe02c41 100644 --- a/scripts/breaking_changes_checker/detect_breaking_changes.py +++ b/scripts/breaking_changes_checker/detect_breaking_changes.py @@ -352,7 +352,7 @@ def main(package_name: str, target_module: str, version: str, in_venv: Union[boo except Exception as err: # catch any issues with capturing the public API and building the report print("\n*****See aka.ms/azsdk/breaking-changes-tool to resolve any build issues*****\n") - # remove_json_files(pkg_dir) + remove_json_files(pkg_dir) raise err From 8a61434f0ec70c5d331f39be2b7df60c7248792d Mon Sep 17 00:00:00 2001 From: Catalina Peralta Date: Tue, 11 Jun 2024 18:12:11 -0700 Subject: [PATCH 10/11] update tests --- .../breaking_changes_checker/tests/test_breaking_changes.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/breaking_changes_checker/tests/test_breaking_changes.py b/scripts/breaking_changes_checker/tests/test_breaking_changes.py index cd9e7c589313..0ef0bd9cf948 100644 --- a/scripts/breaking_changes_checker/tests/test_breaking_changes.py +++ b/scripts/breaking_changes_checker/tests/test_breaking_changes.py @@ -46,6 +46,7 @@ def test_multiple_checkers(): bc = BreakingChangesTracker(stable, current, diff, "azure-storage-queue") bc.run_checks() + bc.report_breaking_changes() assert len(bc.breaking_changes) == len(EXPECTED) for message in bc.breaking_changes: assert message in EXPECTED @@ -68,6 +69,7 @@ def test_ignore_checks(): bc = BreakingChangesTracker(stable, current, diff, "azure-storage-queue", ignore=ignore) bc.run_checks() + bc.report_breaking_changes() assert len(bc.breaking_changes)+2 == len(EXPECTED) for message in bc.breaking_changes: assert message in EXPECTED[:-2] @@ -154,6 +156,7 @@ def test_replace_all_params(): bc = BreakingChangesTracker(stable, current, diff, "azure-storage-queue") bc.run_checks() + bc.report_breaking_changes() assert len(bc.breaking_changes) == len(EXPECTED) for message in bc.breaking_changes: assert message in EXPECTED @@ -240,6 +243,7 @@ def test_replace_all_functions(): bc = BreakingChangesTracker(stable, current, diff, "azure-storage-queue") bc.run_checks() + bc.report_breaking_changes() assert len(bc.breaking_changes) == len(EXPECTED) for message in bc.breaking_changes: assert message in EXPECTED @@ -312,6 +316,7 @@ def test_replace_all_classes(): bc = BreakingChangesTracker(stable, current, diff, "azure-storage-queue") bc.run_checks() + bc.report_breaking_changes() assert len(bc.breaking_changes) == len(EXPECTED) for message in bc.breaking_changes: assert message in EXPECTED @@ -338,6 +343,7 @@ def test_replace_all_modules(): bc = BreakingChangesTracker(stable, current, diff, "azure-storage-queue") bc.run_checks() + bc.report_breaking_changes() assert len(bc.breaking_changes) == len(EXPECTED) for message in bc.breaking_changes: assert message in EXPECTED \ No newline at end of file From bee74d6705dd3092dfb8ecae47caf057fa2228bf Mon Sep 17 00:00:00 2001 From: Catalina Peralta Date: Tue, 11 Jun 2024 19:06:07 -0700 Subject: [PATCH 11/11] add changelog test --- .../code-reports/content-safety/current.json | 3527 +++++++++++++++++ .../code-reports/content-safety/stable.json | 3094 +++++++++++++++ .../tests/test_changelog.py | 27 + 3 files changed, 6648 insertions(+) create mode 100644 scripts/breaking_changes_checker/tests/examples/code-reports/content-safety/current.json create mode 100644 scripts/breaking_changes_checker/tests/examples/code-reports/content-safety/stable.json create mode 100644 scripts/breaking_changes_checker/tests/test_changelog.py diff --git a/scripts/breaking_changes_checker/tests/examples/code-reports/content-safety/current.json b/scripts/breaking_changes_checker/tests/examples/code-reports/content-safety/current.json new file mode 100644 index 000000000000..80ed97afbc34 --- /dev/null +++ b/scripts/breaking_changes_checker/tests/examples/code-reports/content-safety/current.json @@ -0,0 +1,3527 @@ +{ + "azure.ai.contentsafety": { + "class_nodes": { + "BlocklistClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "add_or_update_blocklist_items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "options": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "create_or_update_text_blocklist": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "options": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "delete_text_blocklist": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "get_text_blocklist": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "get_text_blocklist_item": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_item_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "list_text_blocklist_items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "list_text_blocklists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "new_blocklist_client_method": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "remove_blocklist_items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "options": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "send_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "stream": { + "default": false, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + } + }, + "properties": { + "_client": "_client", + "client_side_validation": "client_side_validation" + } + }, + "ContentSafetyClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "analyze_image": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "options": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "analyze_text": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "options": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "send_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "stream": { + "default": false, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + } + }, + "properties": { + "_client": "_client", + "client_side_validation": "client_side_validation" + } + }, + "DifferentClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "add_or_update_blocklist_items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "options": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "create_or_update_text_blocklist": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "options": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "delete_text_blocklist": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "get_text_blocklist": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "get_text_blocklist_item": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_item_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "list_text_blocklist_items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "list_text_blocklists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "remove_blocklist_items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "options": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "send_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "stream": { + "default": false, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + } + }, + "properties": { + "_client": "_client", + "client_side_validation": "client_side_validation" + } + }, + "NewTestClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + } + }, + "function_nodes": {} + }, + "azure.ai.contentsafety.aio": { + "class_nodes": { + "BlocklistClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "add_or_update_blocklist_items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "options": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": true + }, + "create_or_update_text_blocklist": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "options": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true + }, + "delete_text_blocklist": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true + }, + "get_text_blocklist": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true + }, + "get_text_blocklist_item": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_item_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true + }, + "list_text_blocklist_items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "list_text_blocklists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "remove_blocklist_items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "options": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true + }, + "send_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "stream": { + "default": false, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + } + }, + "properties": { + "_client": "_client", + "client_side_validation": "client_side_validation" + } + }, + "ContentSafetyClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "analyze_image": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "options": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true + }, + "analyze_text": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "options": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": true + }, + "send_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "stream": { + "default": false, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + } + }, + "properties": { + "_client": "_client", + "client_side_validation": "client_side_validation" + } + } + }, + "function_nodes": {} + }, + "azure.ai.contentsafety.models": { + "class_nodes": { + "AddOrUpdateTextBlocklistItemsOptions": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "blocklist_items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "AddOrUpdateTextBlocklistItemsResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "blocklist_items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "AnalyzeImageOptions": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "categories": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "image": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "output_type": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "AnalyzeImageOutputType": { + "type": "Enum", + "methods": {}, + "properties": { + "FOUR_SEVERITY_LEVELS": "FOUR_SEVERITY_LEVELS" + } + }, + "AnalyzeImageResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "categories_analysis": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "AnalyzeTextOptions": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "blocklist_names": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "categories": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "halt_on_blocklist_hit": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "output_type": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "text": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "AnalyzeTextOutputType": { + "type": "Enum", + "methods": {}, + "properties": { + "EIGHT_SEVERITY_LEVELS": "EIGHT_SEVERITY_LEVELS", + "FOUR_SEVERITY_LEVELS": "FOUR_SEVERITY_LEVELS" + } + }, + "AnalyzeTextResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "new_class_attr": { + "default": null, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "blocklists_match": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "categories_analysis": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "test_method": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "ImageCategoriesAnalysis": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "category": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "severity": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "ImageCategory": { + "type": "Enum", + "methods": {}, + "properties": { + "HATE": "HATE", + "SELF_HARM": "SELF_HARM", + "SEXUAL": "SEXUAL", + "VIOLENCE": "VIOLENCE" + } + }, + "ImageData": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "blob_url": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "content": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "NewTestAnalyzeTextResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "blocklists_match": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "categories_analysis": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "RemoveTextBlocklistItemsOptions": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "blocklist_item_ids": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "TextBlocklist": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "blocklist_name": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "description": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "TextBlocklistItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "blocklist_item_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "description": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "text": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "TextBlocklistMatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "blocklist_item_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "blocklist_item_text": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "blocklist_name": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "TextCategoriesAnalysis": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "category": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "severity": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "TextCategory": { + "type": "Enum", + "methods": {}, + "properties": { + "HATE": "HATE", + "SELF_HARM": "SELF_HARM", + "SEXUAL": "SEXUAL", + "VIOLENCE": "VIOLENCE" + } + } + }, + "function_nodes": {} + } +} \ No newline at end of file diff --git a/scripts/breaking_changes_checker/tests/examples/code-reports/content-safety/stable.json b/scripts/breaking_changes_checker/tests/examples/code-reports/content-safety/stable.json new file mode 100644 index 000000000000..55184628e32e --- /dev/null +++ b/scripts/breaking_changes_checker/tests/examples/code-reports/content-safety/stable.json @@ -0,0 +1,3094 @@ +{ + "azure.ai.contentsafety": { + "class_nodes": { + "BlocklistClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "add_or_update_blocklist_items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "options": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "create_or_update_text_blocklist": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "options": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "delete_text_blocklist": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "get_text_blocklist": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "get_text_blocklist_item": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_item_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "list_text_blocklist_items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "list_text_blocklists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "remove_blocklist_items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "options": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "send_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "stream": { + "default": false, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + } + }, + "properties": { + "_client": "_client", + "client_side_validation": "client_side_validation" + } + }, + "ContentSafetyClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "analyze_image": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "options": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "analyze_text": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "options": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "send_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "stream": { + "default": false, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + } + }, + "properties": { + "_client": "_client", + "client_side_validation": "client_side_validation" + } + } + }, + "function_nodes": {} + }, + "azure.ai.contentsafety.aio": { + "class_nodes": { + "BlocklistClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "add_or_update_blocklist_items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "options": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": true + }, + "create_or_update_text_blocklist": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "options": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true + }, + "delete_text_blocklist": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true + }, + "get_text_blocklist": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true + }, + "get_text_blocklist_item": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_item_id": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true + }, + "list_text_blocklist_items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "top": { + "default": "none", + "param_type": "keyword_only" + }, + "skip": { + "default": "none", + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "list_text_blocklists": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "remove_blocklist_items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "blocklist_name": { + "default": null, + "param_type": "positional_or_keyword" + }, + "options": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true + }, + "send_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "stream": { + "default": false, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + } + }, + "properties": { + "_client": "_client", + "client_side_validation": "client_side_validation" + } + }, + "ContentSafetyClient": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "endpoint": { + "default": null, + "param_type": "positional_or_keyword" + }, + "credential": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "analyze_image": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "options": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true + }, + "analyze_text": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "options": { + "default": null, + "param_type": "positional_or_keyword" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": true + }, + "close": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": true + }, + "send_request": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "request": { + "default": null, + "param_type": "positional_or_keyword" + }, + "stream": { + "default": false, + "param_type": "keyword_only" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + } + }, + "properties": { + "_client": "_client", + "client_side_validation": "client_side_validation" + } + } + }, + "function_nodes": {} + }, + "azure.ai.contentsafety.models": { + "class_nodes": { + "AddOrUpdateTextBlocklistItemsOptions": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "blocklist_items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "AddOrUpdateTextBlocklistItemsResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "blocklist_items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "AnalyzeImageOptions": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "categories": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "image": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "output_type": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "AnalyzeImageOutputType": { + "type": "Enum", + "methods": {}, + "properties": { + "FOUR_SEVERITY_LEVELS": "FOUR_SEVERITY_LEVELS" + } + }, + "AnalyzeImageResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "categories_analysis": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "AnalyzeTextOptions": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "blocklist_names": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "categories": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "halt_on_blocklist_hit": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "output_type": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "text": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "AnalyzeTextOutputType": { + "type": "Enum", + "methods": {}, + "properties": { + "EIGHT_SEVERITY_LEVELS": "EIGHT_SEVERITY_LEVELS", + "FOUR_SEVERITY_LEVELS": "FOUR_SEVERITY_LEVELS" + } + }, + "AnalyzeTextResult": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "blocklists_match": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "categories_analysis": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "ImageCategoriesAnalysis": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "category": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "severity": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "ImageCategory": { + "type": "Enum", + "methods": {}, + "properties": { + "HATE": "HATE", + "SELF_HARM": "SELF_HARM", + "SEXUAL": "SEXUAL", + "VIOLENCE": "VIOLENCE" + } + }, + "ImageData": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "blob_url": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "content": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "RemoveTextBlocklistItemsOptions": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "blocklist_item_ids": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "TextBlocklist": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "blocklist_name": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "description": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "TextBlocklistItem": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "blocklist_item_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "description": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "text": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "TextBlocklistMatch": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "blocklist_item_id": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "blocklist_item_text": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "blocklist_name": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "TextCategoriesAnalysis": { + "type": null, + "methods": { + "__init__": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "as_dict": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "category": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "exclude_readonly": { + "default": false, + "param_type": "keyword_only" + } + }, + "is_async": false + }, + "clear": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "copy": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "get": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "none", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "items": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "keys": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "pop": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "popitem": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "setdefault": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "severity": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "key": { + "default": null, + "param_type": "positional_or_keyword" + }, + "default": { + "default": "object", + "param_type": "positional_or_keyword" + } + }, + "is_async": false + }, + "update": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + }, + "args": { + "default": null, + "param_type": "var_positional" + }, + "kwargs": { + "default": null, + "param_type": "var_keyword" + } + }, + "is_async": false + }, + "values": { + "parameters": { + "self": { + "default": null, + "param_type": "positional_or_keyword" + } + }, + "is_async": false + } + }, + "properties": {} + }, + "TextCategory": { + "type": "Enum", + "methods": {}, + "properties": { + "HATE": "HATE", + "SELF_HARM": "SELF_HARM", + "SEXUAL": "SEXUAL", + "VIOLENCE": "VIOLENCE" + } + } + }, + "function_nodes": {} + } +} \ No newline at end of file diff --git a/scripts/breaking_changes_checker/tests/test_changelog.py b/scripts/breaking_changes_checker/tests/test_changelog.py new file mode 100644 index 000000000000..5cf15cda5930 --- /dev/null +++ b/scripts/breaking_changes_checker/tests/test_changelog.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python + +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import os +import json +import jsondiff +from breaking_changes_checker.breaking_changes_tracker import BreakingChangesTracker, ChangeType + + +def test_changelog_flag(): + with open(os.path.join(os.path.dirname(__file__), "examples", "code-reports", "content-safety", "stable.json"), "r") as fd: + stable = json.load(fd) + with open(os.path.join(os.path.dirname(__file__), "examples", "code-reports", "content-safety", "current.json"), "r") as fd: + current = json.load(fd) + diff = jsondiff.diff(stable, current) + + bc = BreakingChangesTracker(stable, current, diff, "azure-ai-contentsafety", changelog=True) + bc.run_checks() + + assert len(bc.features_added) > 0 + msg, _, *args = bc.features_added[0] + assert msg == BreakingChangesTracker.ADDED_CLIENT_METHOD_MSG + assert args == ['azure.ai.contentsafety', 'BlocklistClient', 'new_blocklist_client_method']