typed.py file not included in package (so mypy thinks there is no type info available)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- build-system
Direzione di ricerca
Inizia confrontando il file py.typed.txt del repository con i file inclusi nel pacchetto pip su PyPI, quindi esamina i metadati del pacchetto e la configurazione di build che controllano l'inclusione. Riproduci l'errore di importazione di mypy con una versione installata di msgraph-core e considera il problema concluso quando il pacchetto pubblicato contiene il marker corretto e mypy riconosce le relative informazioni sui tipi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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_corepackage pip install msgraph-core- Run
mypyagainst 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
- Lingua principale
- Python
- Stelle
- 288
- Fork
- 52
- Merge medio
- 8h 10m
- PR unite (30g)
- 1
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoftgraph/msgraph-sdk-python-core
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Logging to root logger Apertastatus:waiting-for-triage type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
status:waiting-for-triage type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
microsoftgraph/msgraph-sdk-python-core#1030 · 2 commenti · 4 reazioni ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 76/100
-
Replace httpx with httpx2 Apertastatus:waiting-for-triage type:feature
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
Tutte le issue di microsoftgraph/msgraph-sdk-python-core
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
learningequality/ricecooker#747 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
BSData/horus-heresy-3rd-edition#3171 ·
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
run-llama/llama_index#23199 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
KhronosGroup/glTF-Blender-IO#2769 ·