Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Fix broken links in documentation to microsoft_agents_a365.notifications.models.agent_notification_activity.TModel

Aberta
#239 0 comentários 1 reação 2 responsáveis Ver no GitHub

@JimDaly já está trabalhando nisso.

Desde 24/4/2026.

  • #240 de @copilot-swe-agent — fechado sem integrar

Avaliação

Esta issue ainda não foi avaliada.

Descrição

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.

Linguagem predominante
Python
Estrelas
41
Forks
23
Merge médio
19h 58min
PRs com merge (30d)
2

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de microsoft/Agent365-python

Todas as issues de microsoft/Agent365-python

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.