Skip to content

Strictness option to use precise returns types for certain stdlib functions #6214

Closed
@JukkaL

Description

@JukkaL

The return type of int.__pow__ is Any, since the precise type depends on the value of the right operand. Maybe we should have a strictness option that makes the return type float instead. This probably shouldn't be enabled by default, since it can generate false positives. We could use the same thing for pow() and perhaps some other commonly used stdlib functions -- and maybe even for JSON return values from json once we have recursive types.

See #6210 for context.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions