Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[docs] Fix outdated API references in doc/dev/mgmt/tests.md

未关闭
#48,400 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1-3 小时
新手友好度
25/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
停滞
技术栈
azure, python
领域
documentation

调研方向

对照当前的 azure-identity API 以及 mgmt_settings_fake.py 中的辅助函数名称,检查 doc/dev/mgmt/tests.md。确认凭据参数、辅助函数和测试用例类引用与源代码一致,然后验证文档中的示例在内部保持一致。

由索引模型根据 Issue 内容生成。

描述

agentic-workflows automated documentation

Summary

Reviewed all markdown files under doc/ and doc/dev/ for inconsistencies with the current source code. One file had outdated API references.

Changes in doc/dev/mgmt/tests.md
Issue Fix
ClientSecretCredential(secret=...) Changed to client_secret= (correct parameter name per azure-identity)
ClientSecretCredential(tenant=...) Changed to tenant_id= (correct parameter name per azure-identity)
get_azure_core_credential() (singular) Changed to get_azure_core_credentials() (plural) — matches mgmt_settings_fake.py
get_credential() (singular) Changed to get_credentials() (plural) — matches actual helper function name
AzureTestCase class reference Changed to AzureMgmtRecordedTestCase — AzureTestCase no longer exists
Files verified clean (no changes needed)
  • doc/README.md, doc/dev/README.md, doc/tool_usage_guide.md
  • doc/dev/tests.md, doc/dev/dev_setup.md, doc/dev/release.md
  • doc/dev/pylint_checking.md, doc/dev/static_type_checking.md, doc/dev/static_type_checking_cheat_sheet.md
  • All other doc/ and doc/dev/ markdown files

No stale tox references were found (docs already use azpysdk). No broken internal links. No setup.py vs pyproject.toml mismatches.

Generated by Documentation Consistency Check · 262.9 AIC · ⌖ 12.2 AIC · ⊞ 5.8K · ◷


[!NOTE]
This was originally intended as a pull request, but GitHub Actions is not permitted to create or approve pull requests in this repository.
The changes have been pushed to branch doc/fix-mgmt-tests-api-references-b4c97c893c05f6c0.

Click here to create the pull request

To fix the permissions issue, go to Settings → Actions → General and enable Allow GitHub Actions to create and approve pull requests. See also: gh-aw FAQ

Show patch preview (62 of 62 lines)
From d395145311ea7297a2733317323e2dcefbc2e155 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Mon, 3 Aug 2026 06:05:28 +0000
Subject: [PATCH] Fix outdated API references in doc/dev/mgmt/tests.md

- Fix ClientSecretCredential parameter names: secret= -> client_secret=, tenant= -> tenant_id=
- Fix function name references: get_azure_core_credential -> get_azure_core_credentials, get_credential -> get_credentials
- Fix class reference: AzureTestCase -> AzureMgmtRecordedTestCase

Co-authored-by: Copilot <[email protected]>
---
 doc/dev/mgmt/tests.md | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/doc/dev/mgmt/tests.md b/doc/dev/mgmt/tests.md
index 7f7bfdd4..44e71108 100644
--- a/doc/dev/mgmt/tests.md
+++ b/doc/dev/mgmt/tests.md
@@ -77,8 +77,8 @@ from azure.identity import ClientSecretCredential
 
 credentials = ClientSecretCredential(
     client_id = os.environ['AZURE_CLIENT_ID'],
-    secret = os.environ['AZURE_CLIENT_SECRET'],
-    tenant = os.environ['AZURE_TENANT_ID']
+    client_secret = os.environ['AZURE_CLIENT_SECRET'],
+    tenant_id = os.environ['AZURE_TENANT_ID']
 )

Or you can use DefaultAzureCredential, which we prefer.
@@ -98,9 +98,9 @@ In live mode, you need to use real credentials like those you obtained in the pr
Then make the following changes:

  • Change the value of the SUBSCRIPTION_ID constant to your subscription ID. (If you don't have it, you can find it in the "Overview" section of the "Subscriptions" blade in the [Azure portal][azure_portal].)
    -* Change the get_azure_core_credential() function to construct and return a ClientSecretCredential:
    +* Change the get_azure_core_credentials() function to construct and return a ClientSecretCredential:
-def get_azure_core_credential(**kwargs):
+def get_azure_core_credentials(**kwargs):
    from azure.identity import ClientSecretCredential
    import os
    
... (truncated)
主要语言
Python
星标
5.6k
派生
3.4k
平均合并
1 天 18 小时
30 天内合并 PR
214

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Azure/azure-sdk-for-python 的其他 Issue

查看 Azure/azure-sdk-for-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。