Skip to content

Commit 23e209c

Browse files
committed
Fix parameter markup
1 parent 021a488 commit 23e209c

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

importlib_resources/docs/abc.rst

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ resources.
1919
see if it supports the ``ResourceReader`` interface. If it does, it will use
2020
that for all resource access.
2121

22-
23-
ResourceReader API
24-
==================
25-
2622
The ``ResourceReader`` ABC decorates its methods with ``@abstractmethod`` to
2723
indicate that they must all be overridden by the loader that implements this
2824
interface. However, the default implementation of each of these methods is to
@@ -38,7 +34,7 @@ This is so that if the ABC method is accidentally called,
3834

3935
.. py:method:: open_resource(resource)
4036
41-
Open the named **resource** for binary reading. The argument must be
37+
Open the named *resource* for binary reading. The argument must be
4238
filename-like, i.e. it cannot have any path separators in the string.
4339
If the resource cannot be found, :py:exc:`FileNotFoundError` should be
4440
raised.
@@ -53,7 +49,7 @@ This is so that if the ABC method is accidentally called,
5349

5450
.. py:method:: resource_path(resource)
5551
56-
Return the path to the named **resource** as found on the file
52+
Return the path to the named *resource* as found on the file
5753
system.
5854

5955
If the resource is not natively accessible on the file system
@@ -73,13 +69,13 @@ This is so that if the ABC method is accidentally called,
7369

7470
.. py:method:: is_resource(name)
7571
76-
Return a boolean indicating whether **name** is a resource within the
72+
Return a boolean indicating whether *name* is a resource within the
7773
package. *Remember that directories are not resources!*
7874

7975
:param name: A filename-like string (i.e. no path separators) to check
8076
whether it is a resource within the package.
8177
:type resource: str
82-
:return: Flag indicating whether **name** is a resource or not.
78+
:return: Flag indicating whether *name* is a resource or not.
8379
:rtype: bool
8480
:raises FileNotFoundError: when the named resource is not found within
8581
the package.

importlib_resources/docs/api.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ Functions
8080

8181
.. py:function:: importlib_resources.read_text(package, resource, encoding='utf-8', errors='strict')
8282
83-
Read and return the contents of *resource* within *package* as a ``str [#fn1]_.
84-
By default, the contents are read as strict UTF-8.
83+
Read and return the contents of *resource* within *package* as a ``str``
84+
[#fn1]_. By default, the contents are read as strict UTF-8.
8585

8686
:param package: A package name or module object. See above for the API
8787
that such module objects must support.

0 commit comments

Comments
 (0)