Skip to content

os.environ.get() accepts default as keyword argument, but ty reports no-matching-overload #2274

@adamtheturtle

Description

@adamtheturtle

Summary

import os

os.environ.get("FOO", default="BAR")

This code works but ty errors.
mypy and pyright pass.

Version

ty 0.0.8 (aa7559d 2025-12-29)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggenericsBugs or features relating to ty's generics implementation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions