Comments (2)
This is a good script!
Only change that I'd like to point out to future users of it is that in the first function, an await
keyword after the if
is needed.
So instead of:
async def list_files(directory):
files = [file async for file in AsyncPath(directory).iterdir() if file.is_file()]
return files
It should be:
async def list_files(directory):
files = [file async for file in AsyncPath(directory).iterdir() if await file.is_file()]
return files
Hopefully this saves some minor headaches :)
from tldr.
This is a good script!
Only change that I'd like to point out to future users of it is that in the first function, anawait
keyword after theif
is needed.So instead of:
async def list_files(directory): files = [file async for file in AsyncPath(directory).iterdir() if file.is_file()] return files
It should be:
async def list_files(directory): files = [file async for file in AsyncPath(directory).iterdir() if await file.is_file()] return files
Hopefully this saves some minor headaches :)
Thank you for the fix! Feel free to edit my comment and modify the script :)
from tldr.
Related Issues (20)
- Rendering a single pair of curly braces outside of a placeholder is impossible
- [Archive] tldr-pages translations pairs dataset is now officially available on Kaggle
- Page request: difftastic HOT 1
- Page request: objcopy HOT 4
- Page request: jbrowse HOT 2
- Error when using `nvs` HOT 1
- MAINTAINERS: add @tricantivu to Org HOT 2
- MAINTAINERS: add @fazlearefin to Org HOT 2
- [Archive] Enabled requirement for 2FA/Granular Access Token/Automation for tldr-lint package in NPM
- Page modification request: duplicity HOT 4
- Document preference for "{{placeholder}}" instead of {{"placeholder"}}
- bug: deploy script fails CI when a languages doesn't generate a PDF file
- MAINTAINERS: add @gutjuri as Org Owner HOT 2
- MAINTAINERS: add @sebastiaanspeck as Org Owner HOT 2
- Proposal: document shell syntax (i.e. here-strings, etc) for commands in the common directory
- MAINTAINERS: add @Magrid0 to Org HOT 2
- MAINTAINERS: add @kant to Org HOT 3
- `set-alias-page.py` generates misleading pages HOT 2
- Proposal: partially revert #9672 because of misleading translations
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tldr.