From e3882cc2189d7ed5ac42d54a3d1017c3ee2bd11a Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Thu, 3 Oct 2024 11:57:00 +0200 Subject: [PATCH] move documentation of newest_change_from_file --- docs/reference/Replication.md | 3 ++- lib/replication.cc | 3 +-- src/osmium/replication/__init__.py | 3 ++- src/osmium/replication/_replication.pyi | 4 +++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/reference/Replication.md b/docs/reference/Replication.md index efb64bc9..305a9153 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 88a02320..05c12f0a 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 5ab7b088..e5e65708 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 0b3084d8..f66aeb16 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. + """