mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Remove the artificial slowdown
This commit is contained in:
@@ -251,19 +251,11 @@ class DirectoryTree(Tree[DirEntry]):
|
||||
Returns:
|
||||
An iterator of `Path` objects.
|
||||
"""
|
||||
# TODO: Not like this. Oh so very not like this. This is here to
|
||||
# slow things down on purpose, to emulate loading directory
|
||||
# information from a slow source.
|
||||
#
|
||||
# REMOVE BEFORE FLIGHT!
|
||||
import time
|
||||
|
||||
worker = get_current_worker()
|
||||
for entry in directory.iterdir():
|
||||
if worker.is_cancelled:
|
||||
return
|
||||
yield entry
|
||||
time.sleep(0.05)
|
||||
|
||||
def _populate_node(
|
||||
self, node: TreeNode[DirEntry], directory: Iterable[Path]
|
||||
|
||||
Reference in New Issue
Block a user