Skip to content

Improve trio.Path.iterdir - #502

Merged
touilleMan merged 3 commits into
python-trio:masterfrom
touilleMan:correct-path-iterdir
Apr 19, 2018
Merged

touilleMan merged 3 commits into
python-trio:masterfrom
touilleMan:correct-path-iterdir

Conversation

@touilleMan

@touilleMan touilleMan commented Apr 17, 2018 •

Copy link
Copy Markdown
Member

Closes #501

@touilleMan
touilleMan force-pushed the correct-path-iterdir branch from d7ecfe1 to e7f9a69 Compare April 17, 2018 10:05
@codecov

codecov Bot commented Apr 17, 2018 •

Copy link
Copy Markdown

Codecov Report

Merging #502 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #502      +/-   ##
==========================================
+ Coverage   99.27%   99.28%   +0.01%     
==========================================
  Files          89       89              
  Lines       10418    10432      +14     
  Branches      720      722       +2     
==========================================
+ Hits        10342    10357      +15     
  Misses         58       58              
+ Partials       18       17       -1
Impacted Files Coverage Δ
trio/tests/test_path.py 100% <100%> (ø) ⬆️
trio/_path.py 100% <100%> (ø) ⬆️
trio/tests/test_highlevel_open_tcp_listeners.py 100% <0%> (+0.7%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 94d49f9...5ef0dce. Read the comment docs.

Comment thread trio/_path.py Outdated
"""
Almost (see below) like :meth:`iterdir.Path.iterdir`, but async.

Unlike :meth:`iterdir.Path.iterdir`, this method loads the entire

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean pathlib.Path.iterdir?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch ^^

@touilleMan
touilleMan force-pushed the correct-path-iterdir branch from b6e7d5c to 3fc6a07 Compare April 18, 2018 16:10
pathlib.Path.iterdir also loads the whole directory into memory, so removed the
"unlike pathlib.Path.iterdir" text. Also, provided an example of how to call it.
@njsmith

njsmith commented Apr 19, 2018

Copy link
Copy Markdown
Member

Code looks good to me. I edited the docstring, and also edited your initial comment to say "closes #501 ", so when this is merged it will automagically close the issue.

Please go ahead and merge after confirming you like my edited docstring :-)

@touilleMan

Copy link
Copy Markdown
Member Author

Your comments&docstrings are always the best anyway ;-)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants