File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 3
3
import sys
4
4
5
5
from ._compat import metadata
6
+ from .trees import as_file
6
7
7
8
8
9
__all__ = [
9
10
'Package' ,
10
11
'Resource' ,
11
12
'ResourceReader' ,
13
+ 'as_file' ,
12
14
'contents' ,
13
15
'files' ,
14
16
'is_resource' ,
Original file line number Diff line number Diff line change @@ -155,8 +155,7 @@ to this temporary file as a :py:class:`pathlib.Path` object. In order to
155
155
properly clean up this temporary file, what's actually returned is a context
156
156
manager that you can use in a ``with ``-statement::
157
157
158
- from importlib_resources import files
159
- from importlib_resources.trees import as_file
158
+ from importlib_resources import files, as_file
160
159
161
160
source = files(email.tests.data).joinpath('message.eml')
162
161
with as_file(source) as eml:
You can’t perform that action at this time.
0 commit comments