Skip to content

Commit

Permalink
convert code reference from Sphinx to markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
lonvia committed Sep 14, 2024
1 parent f403aae commit 668fbb8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/osmium/forward_reference_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
class ForwardReferenceWriter:
""" Writer that adds forward-referenced objects optionally also making
the final file reference complete. An object is a forward reference
when directly or indirectly references one of the objects originally
when it directly or indirectly needs one of the objects originally
written out.
The collected data is first written into a temporary file, When the
Expand Down
30 changes: 15 additions & 15 deletions src/osmium/osm/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __next__(self) -> Tag:
class TagList(Iterable[Tag]):
""" A fixed list of tags. The list is exported as an unmutable,
dictionary-like object where the keys are tag strings and the
items are :py:class:`osmium.osm.Tag`.
items are [Tags][osmium.osm.Tag].
"""

def __init__(self, parent: 'cosm.TagContainerProtocol') -> None:
Expand Down Expand Up @@ -160,7 +160,7 @@ def __repr__(self) -> str:

class NodeRefList:
""" A list of node references, implemented as
an immutable sequence of :py:class:`osmium.osm.NodeRef`. This class
an immutable sequence of [osmium.osm.NodeRef][]. This class
is normally not used directly, use one of its subclasses instead.
"""

Expand All @@ -182,8 +182,8 @@ def ends_have_same_id(self) -> bool:
def ends_have_same_location(self) -> bool:
""" True if the start and end node of the way are at the same location. "
Expects that the coordinates of the way nodes have been loaded
(see :py:func:`osmium.SimpleHandler.apply_buffer` and
:py:func:`osmium.SimpleHandler.apply_file`).
([SimpleHandler apply functions][osmium.SimpleHandler] and
[`FileProcessor.with_locations()`][osmium.FileProcessor.with_locations]).
If the locations are not present then the function returns always true.
"""
return self._list.ends_have_same_location(self._pyosmium_data)
Expand Down Expand Up @@ -214,18 +214,18 @@ def __repr__(self) -> str:

class WayNodeList(NodeRefList):
""" List of nodes in a way.
For its members see :py:class:`osmium.osm.NodeRefList`.
For its members see [`osmium.osm.NodeRefList`][].
"""


class OuterRing(NodeRefList):
"""List of nodes in an outer ring.
For its members see :py:class:`osmium.osm.NodeRefList`.
For its members see [`osmium.osm.NodeRefList`][].
"""

class InnerRing(NodeRefList):
""" List of nodes in an inner ring. "
For its members see :py:class:`osmium.osm.NodeRefList`.
For its members see [`osmium.osm.NodeRefList`][].
"""

class RelationMember:
Expand Down Expand Up @@ -272,7 +272,7 @@ def __next__(self) -> RelationMember:

class RelationMemberList:
""" An immutable sequence of relation members
":py:class:`osmium.osm.RelationMember`.
[`osmium.osm.RelationMember`][].
"""

def __init__(self, parent: 'cosm.COSMRelation') -> None:
Expand Down Expand Up @@ -361,7 +361,7 @@ def user(self) -> str:
@property
def tags(self) -> TagList:
""" (read-only) List of tags describing the object.
See :py:class:`osmium.osm.TagList`.
See [`osmium.osm.TagList`][].
"""
return self._tags

Expand Down Expand Up @@ -429,7 +429,7 @@ def replace(self, **kwargs: Any) -> 'osmium.osm.mutable.Node':
@property
def location(self) -> 'osmium.osm.Location':
""" The geographic coordinates of the node.
See :py:class:`osmium.osm.Location`.
See [`osmium.osm.Location`][].
"""
if self._location is None:
self._location = self._pyosmium_data.location()
Expand Down Expand Up @@ -489,7 +489,7 @@ def replace(self, **kwargs: Any) -> 'osmium.osm.mutable.Way':
@property
def nodes(self) -> WayNodeList:
""" (read-only) Ordered list of nodes.
See :py:class:`osmium.osm.WayNodeList`.
See [`osmium.osm.WayNodeList`][].
"""
if self._nodes is None:
self._nodes = WayNodeList(self._pyosmium_data, self._pyosmium_data.nodes())
Expand All @@ -510,8 +510,8 @@ def ends_have_same_id(self) -> bool:
def ends_have_same_location(self) -> bool:
""" True if the start and end node of the way are at the same location.
Expects that the coordinates of the way nodes have been loaded
(see :py:func:`osmium.SimpleHandler.apply_buffer` and
:py:func:`osmium.SimpleHandler.apply_file`).
(see [SimpleHandler apply functions][osmium.SimpleHandler] and
[`FileProcessor.with_locations()`][osmium.FileProcessor.with_locations])
If the locations are not present then the function returns always true.
"""
return self._pyosmium_data.ends_have_same_location()
Expand Down Expand Up @@ -555,7 +555,7 @@ def replace(self, **kwargs: Any) -> 'osmium.osm.mutable.Relation':
@property
def members(self) -> RelationMemberList:
"""(read-only) Ordered list of relation members.
See :py:class:`osmium.osm.RelationMemberList`.
See [`osmium.osm.RelationMemberList`][].
"""
return self._members

Expand Down Expand Up @@ -735,7 +735,7 @@ def bounds(self) -> 'osmium.osm.Box':
@property
def tags(self) -> TagList:
""" (read-only) List of tags describing the object.
See :py:class:`osmium.osm.TagList`.
See [`osmium.osm.TagList`][].
"""
return self._tags

Expand Down

0 comments on commit 668fbb8

Please sign in to comment.