Skip to content

Documenting the Any trick #11094

@Akuli

Description

@Akuli

We have explained the Any trick to contributors and users several times, usually related to re stubs, but also a few times in other cases, like #8069 and #10564 (comment).

Maybe we should explain it in CONTRIBUTING.md (or some other file) and comment usages of the Any trick, something like this?

def foo(
    bla bla bla: BlaBlaBla,
    bla bla bla: BlaBlaBla,
) -> Foo | Any: ...  # "the Any trick", see CONTRIBUTING.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions