Skip to content

Using AnyPath for type hinting #540

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions