diff --git a/docs/reference/Replication.md b/docs/reference/Replication.md index efb64bc..305a915 100644 --- a/docs/reference/Replication.md +++ b/docs/reference/Replication.md @@ -7,7 +7,8 @@ ::: osmium.replication.DownloadResult -## Repliction utils +## Replication utils +::: osmium.replication.newest_change_from_file ::: osmium.replication.get_replication_header ::: osmium.replication.ReplicationHeader diff --git a/lib/replication.cc b/lib/replication.cc index 88a0232..05c12f0 100644 --- a/lib/replication.cc +++ b/lib/replication.cc @@ -42,6 +42,5 @@ PYBIND11_MODULE(_replication, m) reader.close(); return handler.last_change; - }, - "Find the date of the most recent change in a file."); + }); } diff --git a/src/osmium/replication/__init__.py b/src/osmium/replication/__init__.py index 5ab7b08..e5e6570 100644 --- a/src/osmium/replication/__init__.py +++ b/src/osmium/replication/__init__.py @@ -4,7 +4,8 @@ # # Copyright (C) 2023 Sarah Hoffmann and others. # For a full list of authors see the git log. -from ._replication import * + +from ._replication import (newest_change_from_file as newest_change_from_file) from .server import (ReplicationServer as ReplicationServer, OsmosisState as OsmosisState, diff --git a/src/osmium/replication/_replication.pyi b/src/osmium/replication/_replication.pyi index 0b3084d..f66aeb1 100644 --- a/src/osmium/replication/_replication.pyi +++ b/src/osmium/replication/_replication.pyi @@ -6,4 +6,6 @@ # For a full list of authors see the git log. import datetime -def newest_change_from_file(filename: str) -> datetime.datetime: ... +def newest_change_from_file(filename: str) -> datetime.datetime: + """ Find the data of the most recent change in a file. + """