[docs] Fix outdated API references in doc/dev/mgmt/tests.md
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 25/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- azure, python
调研方向
对照当前的 azure-identity API 以及 mgmt_settings_fake.py 中的辅助函数名称,检查 doc/dev/mgmt/tests.md。确认凭据参数、辅助函数和测试用例类引用与源代码一致,然后验证文档中的示例在内部保持一致。
由索引模型根据 Issue 内容生成。
描述
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.mddoc/dev/tests.md,doc/dev/dev_setup.md,doc/dev/release.mddoc/dev/pylint_checking.md,doc/dev/static_type_checking.md,doc/dev/static_type_checking_cheat_sheet.md- All other
doc/anddoc/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 branchdoc/fix-mgmt-tests-api-references-b4c97c893c05f6c0.
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_IDconstant 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 theget_azure_core_credential()function to construct and return aClientSecretCredential:
+* Change theget_azure_core_credentials()function to construct and return aClientSecretCredential:
-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
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Azure/azure-sdk-for-python 的其他 Issue
-
Evaluation Service Attention
难度 2/5 1-3 小时 新手友好度 84/100
Azure/azure-sdk-for-python#49190 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 90/100
Azure/azure-sdk-for-python#49183 · 1 个 reaction ·
维护者通常 1 天内回复
-
Evaluation Service Attention
难度 2/5 1-3 小时 新手友好度 75/100
Azure/azure-sdk-for-python#49153 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
Search Service Attention
难度 2/5 1-3 小时 新手友好度 74/100
Azure/azure-sdk-for-python#48555 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
Azure.Core customer-reported feature-request needs-team-attention
难度 2/5 1-3 小时 新手友好度 76/100
Azure/azure-sdk-for-python#47186 ·
维护者通常 1 天内回复
查看 Azure/azure-sdk-for-python 的全部 Issue
相似的 Issue
-
customer-reported
难度 2/5 1-3 小时 新手友好度 68/100
Azure/azure-cli#34150 · 1 条评论 ·
维护者通常 1 天内回复
-
community-request
难度 1/5 1 小时以内 新手友好度 95/100
NVIDIA-NeMo/Curator#2464 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
WeblateOrg/translation-finder#1099 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
trezor/trezor-firmware#7997 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复