Help: with use anyio as pathlib.Path #808
Answered
by
agronholm
heavyblack1
asked this question in
Q&A
-
It should be easy call your Please can you correct me how to use your library. Thanks from anyio import Path as AsyncPath
cwd:AsyncPath = AsyncPath.cwd()
# Syntax Error according pylance
# Type "Coroutine[Any, Any, Path]" is not assignable to declared type "Path"
# "Coroutine[Any, Any, Path]" is not assignable to "Path"
# Syntax Error according pylance
# Cannot access attribute "glob" for class "Coroutine[Any, Any, Path]"
# Attribute "glob" is unknown
async for path in cwd.glob('*.txt'):
... |
Beta Was this translation helpful? Give feedback.
Answered by
agronholm
Oct 13, 2024
Replies: 1 comment 1 reply
-
Have you tried awaiting on |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
heavyblack1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have you tried awaiting on
AsyncPath.cwd()
?