Skip to content

We need a policy for undocumented attributes #1902

@gvanrossum

Description

@gvanrossum

In the past week alone I've seen several issues where well-meaning contributors wanted to add undocumented attributes to typeshed:

I think we should have a standard policy on these. I know in the past we've sometimes added such attributes, with the argument that there's existing working code that uses them. But AFAIK there's no other tool that is capable of flagging the use of undocumented attributes, so I'm kind of leaning towards seeing this as a valuable service mypy (or rather, typeshed) provides, rather than a deficiency in the stubs. For example, if we were to add these attributes to the stubs, IDEs like PyCharm would start suggesting auto-completion for undocumented attributes, which I definitely think is a bad idea. If there's something that's commonly used, it should just be included in the docs first -- the process for that is clear (file an issue on bugs.python.org).

Metadata

Metadata

Assignees

No one assigned

    Labels

    project: policyOrganization of the typeshed project

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions