Skip to content

Rename _typeshed.AnyPath? #5470

@srittau

Description

@srittau

TLDR: Let's rename AnyPath to PathName (or a better alias).

I seem to remember that @JelleZijlstra didn't like the name AnyPath as an alias for str | bytes | PathLike[str] | PathLike[bytes] when I introduced it. I agreed, but couldn't come up with a better name. When working on #5467, it became apparent to me that having a "real" AnyPath, i.e. an alias that is basically AnyPath[_T] = _T | PathLike[_T] would be quite useful. I don't think there is a way to have a generic alias yet, but I still propose we should rename AnyPath in preparation and to avoid confusion with AnyStr. The best I can come up with at the moment is PathName. Any better ideas? Other suggestions? Not a good idea?

Metadata

Metadata

Assignees

No one assigned

    Labels

    project: policyOrganization of the typeshed project

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions