Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make stubgen generate PEP-561/typing docs compliant '-stubs' package directory names #17764

Open
froh opened this issue Sep 12, 2024 · 0 comments
Labels
bug mypy got something wrong

Comments

@froh
Copy link

froh commented Sep 12, 2024

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
@froh froh added the bug mypy got something wrong label Sep 12, 2024
@froh froh changed the title make stubgen generate [PEP-561](https://typing.readthedocs.io/en/latest/spec/distributing.html#packaging-typed-libraries) compliant stubs package directory names make stubgen generate PEP-561/typing dosc compliant '-stubs' package directory names Sep 12, 2024
@froh froh changed the title make stubgen generate PEP-561/typing dosc compliant '-stubs' package directory names make stubgen generate PEP-561/typing docs compliant '-stubs' package directory names Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

No branches or pull requests

1 participant