Skip to content

Commit b8f9643

Browse files
author
Yuki Kobayashi
committed
Update library/importlib.resources.abc.rst
1 parent 58eeb77 commit b8f9643

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

Doc/library/importlib.resources.abc.rst

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -49,44 +49,44 @@
4949
.. method:: open_resource(resource)
5050
:abstractmethod:
5151

52-
Returns an opened, :term:`file-like object` for binary reading
53-
of the *resource*.
52+
Returns an opened, :term:`file-like object` for binary reading
53+
of the *resource*.
5454

55-
If the resource cannot be found, :exc:`FileNotFoundError` is
56-
raised.
55+
If the resource cannot be found, :exc:`FileNotFoundError` is
56+
raised.
5757

5858
.. method:: resource_path(resource)
5959
:abstractmethod:
6060

61-
Returns the file system path to the *resource*.
61+
Returns the file system path to the *resource*.
6262

63-
If the resource does not concretely exist on the file system,
64-
raise :exc:`FileNotFoundError`.
63+
If the resource does not concretely exist on the file system,
64+
raise :exc:`FileNotFoundError`.
6565

6666
.. method:: is_resource(name)
6767
:abstractmethod:
6868

69-
Returns ``True`` if the named *name* is considered a resource.
70-
:exc:`FileNotFoundError` is raised if *name* does not exist.
69+
Returns ``True`` if the named *name* is considered a resource.
70+
:exc:`FileNotFoundError` is raised if *name* does not exist.
7171

7272
.. method:: contents()
7373
:abstractmethod:
7474

75-
Returns an :term:`iterable` of strings over the contents of
76-
the package. Do note that it is not required that all names
77-
returned by the iterator be actual resources, e.g. it is
78-
acceptable to return names for which :meth:`is_resource` would
79-
be false.
80-
81-
Allowing non-resource names to be returned is to allow for
82-
situations where how a package and its resources are stored
83-
are known a priori and the non-resource names would be useful.
84-
For instance, returning subdirectory names is allowed so that
85-
when it is known that the package and resources are stored on
86-
the file system then those subdirectory names can be used
87-
directly.
88-
89-
The abstract method returns an iterable of no items.
75+
Returns an :term:`iterable` of strings over the contents of
76+
the package. Do note that it is not required that all names
77+
returned by the iterator be actual resources, e.g. it is
78+
acceptable to return names for which :meth:`is_resource` would
79+
be false.
80+
81+
Allowing non-resource names to be returned is to allow for
82+
situations where how a package and its resources are stored
83+
are known a priori and the non-resource names would be useful.
84+
For instance, returning subdirectory names is allowed so that
85+
when it is known that the package and resources are stored on
86+
the file system then those subdirectory names can be used
87+
directly.
88+
89+
The abstract method returns an iterable of no items.
9090

9191

9292
.. class:: Traversable

0 commit comments

Comments
 (0)