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

typed.py file not included in package (so mypy thinks there is no type info available)

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

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
45/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
python
Domínio
build-system

Direção de pesquisa

Comece comparando o arquivo py.typed.txt do repositório com os arquivos incluídos no pacote pip no PyPI e, em seguida, inspecione os metadados do pacote e a configuração de build que controlam a inclusão. Reproduza o erro de importação do mypy com uma versão instalada de msgraph-core e considere a issue concluída quando o pacote publicado contiver o marcador correto e o mypy reconhecer suas informações de tipo.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

type:investigation
Describe the bug

When I run mypy against my project that uses the msgraph_core library, I get an error indicating that the library has no type information:

my/code.py:1: error: Skipping analyzing "msgraph_core": module is installed, but missing library stubs or py.typed marker  [import-untyped]
my/code.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports

I see that there is a file called py.typed.txt in the repo (why not just py.typed?) but it doesn't appear in the package that I get via pip (i.e., the one I'd download from https://pypi.org/project/msgraph-core/#files).

Expected behavior

The py.typed file is in the package; mypy (or other type checking tools) have a correct set of types for the package.

How to reproduce

I'm not sure of an exactly minimal repro case, but unless there is something specifically odd with my environment that's contributing, I would guess:

  • create a new Python file that imports something from the msgraph_core package
  • pip install msgraph-core
  • Run mypy against the file
SDK Version

At least 1.3.3, 1.2.1, and 1.1.6

Latest version known to work for scenario above?

I didn't see the py.typed file in 1.1.0, so it must be at least that old

Known Workarounds

Disable type checking for the msgraph-core package.

Debug output

No response

Configuration
  • macOS Sequoia , ARM
  • I don't think it's specific to this configuration
Other information

No response

Linguagem predominante
Python
Estrelas
288
Forks
52
Merge médio
8h 10min
PRs com merge (30d)
1

Guia de contribuição

Abrir o guia de contribuição

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 microsoftgraph/msgraph-sdk-python-core

Todas as issues de microsoftgraph/msgraph-sdk-python-core

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.