Skip to content

Using AnyPath for type hinting #540

@jdcc-betterup

Description

@jdcc-betterup

I'd like to type annotate with AnyPath to show that a function could accept local or cloud paths, but my type checker yells because AnyPath doesn't have an __fspath__ (or isn't compatible with ReadBuffer). This would be simple to add, but there might be other undesirable follow-on effects from making it path-like that I'm not aware of (specifically thinking of #128).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions