make stubgen generate PEP-561/typing docs compliant '-stubs' package directory names
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 20.6k
- Forks
- 3.3k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
Bug Report
the stubgen --output doesn't generate package directories named as mandated by PEP-561/the typing docs.
PEP-561 states that "The name of the stub package MUST follow the scheme foopkg-stubs for type stubs for the package named foopkg."
To Reproduce and Actual Behavior
currently the packages in are placed into subdirectories named like the package.
so for a package foobar, the stubs currently are generated into a out/foopkg directory, where out is the default for the --output parameter to stubgen, like so:
$ stubgen --inspect-mode --ignore-errors --package mypy
... lots of output
$ find out -type d
out/
out/mypy
out/mypy/server
out/mypy/plugins
out/mypy/dmypy
Expected Behavior
the output should instead have a -stubs suffix to the üpackage name, out/foopkg-stubs, like so:
$ stubgen --inspect-mode --ignore-errors --package mypy
... lots of output
$ find out -type d
out/
out/mypy-stubs
out/mypy-stubs/server
out/mypy-stubs/plugins
out/mypy-stubs/dmypy
Your Environment
$ pip list
Package Version
----------------- -------
mypy 1.11.2
mypy-extensions 1.0.0
$ python --version
Python 3.12.6
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der --output-Verarbeitung der stubgen CLI und reproduziere die Paketerzeugung unter Verwendung der im Bericht gezeigten Optionen --inspect-mode, --ignore-errors und --package. Verfolge, wo Paketverzeichnisse benannt werden, und überprüfe anschließend, dass generierte Paket-Stubs das erforderliche Suffix -stubs verwenden und ihre verschachtelten Module beibehalten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- cli, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 45/100