Skip to content

TextIOBuffer _WrappedBuffer attr isatty should be bool #12437

Closed
@ashleysommer

Description

@ashleysommer

There was a small bug in this PR earlier this year to create a protocol for TextIOBuffer _WrappedBuffer
#11420

See here:

def isatty(self) -> int: ...

isatty should return bool.

Notice isatty on IOBase is a bool:

def isatty(self) -> bool: ...

And literally every other occurrence of isatty in every other type stub is a bool too.

Looks like the mistake came from this comment because that comment incorrectly lists isatty as int too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions