Skip to content

StrOrBytesPath | FileDescriptor alias #9297

Closed
@Avasam

Description

@Avasam

Opening an issue so we don't forget.

Original comment from @AlexWaygood :

We could actually consider adding this alias to _typeshed; there's a bunch of functions in os/__init__.pyi that could use it. os/__init__.pyi currently defines an _FdOrAnyPath alias. We don't need to add the alias to _typeshed in this PR, though.

There's a handful of _OpenFile aliases also defined in multiple stubs

There's also a lot of int | StrOrBytesPath, StrOrBytesPath | int and StrOrBytesPath | FileDescriptor which could be replaced by the alias.

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