@@ -390,7 +390,8 @@ ABC hierarchy::
390390 This ABC is deprecated in favour of supporting resource loading
391391 through :class: `importlib.resources.abc.TraversableResources `.
392392
393- .. abstractmethod :: get_data(path)
393+ .. method :: get_data(path)
394+ :abstractmethod:
394395
395396 An abstract method to return the bytes for the data located at *path *.
396397 Loaders that have a file-like storage back-end
@@ -427,7 +428,8 @@ ABC hierarchy::
427428 .. versionchanged :: 3.4
428429 No longer abstract and a concrete implementation is provided.
429430
430- .. abstractmethod :: get_source(fullname)
431+ .. method :: get_source(fullname)
432+ :abstractmethod:
431433
432434 An abstract method to return the source of a module. It is returned as
433435 a text string using :term: `universal newlines `, translating all
@@ -484,7 +486,8 @@ ABC hierarchy::
484486 when implemented, helps a module to be executed as a script. The ABC
485487 represents an optional :pep: `302 ` protocol.
486488
487- .. abstractmethod :: get_filename(fullname)
489+ .. method :: get_filename(fullname)
490+ :abstractmethod:
488491
489492 An abstract method that is to return the value of
490493 :attr: `~module.__file__ ` for the specified module. If no path is
@@ -524,11 +527,13 @@ ABC hierarchy::
524527 .. deprecated :: 3.4
525528 Use :meth: `Loader.exec_module ` instead.
526529
527- .. abstractmethod :: get_filename(fullname)
530+ .. method :: get_filename(fullname)
531+ :abstractmethod:
528532
529533 Returns :attr: `path `.
530534
531- .. abstractmethod :: get_data(path)
535+ .. method :: get_data(path)
536+ :abstractmethod:
532537
533538 Reads *path * as a binary file and returns the bytes from it.
534539
@@ -664,27 +669,31 @@ ABC hierarchy::
664669 .. deprecated-removed :: 3.12 3.14
665670 Use :class: `importlib.resources.abc.TraversableResources ` instead.
666671
667- .. abstractmethod :: open_resource(resource)
672+ .. method :: open_resource(resource)
673+ :abstractmethod:
668674
669675 Returns an opened, :term: `file-like object ` for binary reading
670676 of the *resource *.
671677
672678 If the resource cannot be found, :exc: `FileNotFoundError ` is
673679 raised.
674680
675- .. abstractmethod :: resource_path(resource)
681+ .. method :: resource_path(resource)
682+ :abstractmethod:
676683
677684 Returns the file system path to the *resource *.
678685
679686 If the resource does not concretely exist on the file system,
680687 raise :exc: `FileNotFoundError `.
681688
682- .. abstractmethod :: is_resource(name)
689+ .. method :: is_resource(name)
690+ :abstractmethod:
683691
684692 Returns ``True `` if the named *name * is considered a resource.
685693 :exc: `FileNotFoundError ` is raised if *name * does not exist.
686694
687- .. abstractmethod :: contents()
695+ .. method :: contents()
696+ :abstractmethod:
688697
689698 Returns an :term: `iterable ` of strings over the contents of
690699 the package. Do note that it is not required that all names
@@ -720,27 +729,33 @@ ABC hierarchy::
720729
721730 Abstract. The base name of this object without any parent references.
722731
723- .. abstractmethod :: iterdir()
732+ .. method :: iterdir()
733+ :abstractmethod:
724734
725735 Yield ``Traversable `` objects in ``self ``.
726736
727- .. abstractmethod :: is_dir()
737+ .. method :: is_dir()
738+ :abstractmethod:
728739
729740 Return ``True `` if ``self `` is a directory.
730741
731- .. abstractmethod :: is_file()
742+ .. method :: is_file()
743+ :abstractmethod:
732744
733745 Return ``True `` if ``self `` is a file.
734746
735- .. abstractmethod :: joinpath(child)
747+ .. method :: joinpath(child)
748+ :abstractmethod:
736749
737750 Return Traversable child in ``self ``.
738751
739- .. abstractmethod :: __truediv__(child)
752+ .. method :: __truediv__(child)
753+ :abstractmethod:
740754
741755 Return ``Traversable `` child in ``self ``.
742756
743- .. abstractmethod :: open(mode='r', *args, **kwargs)
757+ .. method :: open(mode='r', *args, **kwargs)
758+ :abstractmethod:
744759
745760 *mode * may be 'r' or 'rb' to open as text or binary. Return a handle
746761 suitable for reading (same as :attr: `pathlib.Path.open `).
@@ -774,7 +789,8 @@ ABC hierarchy::
774789 .. deprecated-removed :: 3.12 3.14
775790 Use :class: `importlib.resources.abc.TraversableResources ` instead.
776791
777- .. abstractmethod :: files()
792+ .. method :: files()
793+ :abstractmethod:
778794
779795 Returns a :class: `importlib.resources.abc.Traversable ` object for the loaded
780796 package.
0 commit comments