Fix broken links in documentation to microsoft_agents_a365.notifications.models.agent_notification_activity.TModel
Évaluation
Cette issue n'a pas encore été évaluée.
Description
The documentation for the AgentNotificationActivity.as_model method contains broken links to <xref:microsoft_agents_a365.notifications.models.agent_notification_activity.TModel>
Cause according to Claude:
The DocFx generator sees the TypeVar in the type annotation and tries to build a cross-reference link to it — just like it would for a real class. But TModel is a TypeVar, not a documented type, so there's no page to link to and the xref renders as broken text:
Type[<xref:microsoft_agents_a365.notifications.models.agent_notification_activity.TModel>]
TypeVar is defined at module level (agent_notification_activity.py:10):
TModel = TypeVar("TModel")
DocFx doesn't have special handling for TypeVar instances — it treats them like class references. This is a doc generator limitation, but the underlying cause is that TypeVar at module scope bleeds into the doc generation as if it were a public documented type.
Claude's recommendation to fix:
Rename TModel to _TModel (underscore prefix) at [agent_notification_activity.py:10].
The underscore convention marks it as private/internal. Doc generators respect this and won't try to generate a cross-reference link for it — they'll render it as plain text instead.
before
TModel = TypeVar("TModel")
def as_model(self, model: Type[TModel]) -> Optional[TModel]:
after
_TModel = TypeVar("_TModel")
def as_model(self, model: Type[_TModel]) -> Optional[_TModel]:
This is also the standard Python convention — TypeVars that aren't part of a public generic API (e.g., on a public generic class) should always be underscore-prefixed.
- Langage dominant
- Python
- Étoiles
- 41
- Forks
- 23
- Merge moyen
- 19 h 58 min
- PR mergées (30 j)
- 2
Préparer son environnement
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de microsoft/Agent365-python
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
microsoft/Agent365-python#249 ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 78/100
microsoft/Agent365-python#271 ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
microsoft/Agent365-python#270 ·
-
[python/agent-framework/sample-agent] Sample dependencies are inconsistent on PyPI — cannot runOuverte
Difficulté 4/5 3-5 jours Accessibilité débutants 38/100
microsoft/Agent365-python#262 ·
-
Bug: NonRecordingSpan crashes with 'NonRecordingSpan object has no attribute context' when observability exporter is enabledPeut-être à nouveau libre @nikhilNava l’a pris il y a 128 jours, et aucune pull request n’est ouverte. Ouverte
microsoft/Agent365-python#257 · 2 commentaires · 1 personne assignée ·
Toutes les issues de microsoft/Agent365-python
Issues similaires
-
[request] poppler-data/0.4.12Ouverteupstream update
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
conan-io/conan-center-index#31098 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
john-kurkowski/tldextract#382 ·
-
comp/tools duplicate P2 sweeper:risk-compatibility tool/mcp type/bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
NousResearch/hermes-agent#132042 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
deepset-ai/haystack#13092 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 1-3 heures Accessibilité débutants 85/100
feder-cr/invisible_playwright_mcp#1408 ·
Les mainteneurs répondent en général sous 1 jour