Skip to content

[feature] Provide stubs for Python API #17454

Closed as not planned
Closed as not planned
@marlamb

Description

@marlamb

What is your suggestion?

Hi, I started using the API provided by Conan2 and enjoy it a lot. However, I am missing stubs, which would bring multiple benefits

  • Simpler coding using auto-completion offered by IDEs.
  • Enables static checks, e.g. via mypy or pyright, such that users can also easily detect changes in new versions, even if not covered by tests.

I think at least the first point would also apply to all kind of functionality used in conanfiles, but for the API I would consider them even more beneficial, as one can safely assume that a growing number of users will have custom code relying on the API and is not that formally restricted than conanfiles are.

Note that already others tried to provide some stubs for conanfiles, but according to their documentation it is for version 1.59 only. Even if there would be more activity, providing them from directly within the package would be great, as it would not suffer from any outdate-ness problem.

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions