Skip to content

Commit 75e5fb7

Browse files
committed
Update __init__.py
blank line missing.
1 parent 6b86bc9 commit 75e5fb7

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

adafruit_fruitjam/__init__.py

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -248,17 +248,20 @@ def __init__( # noqa: PLR0912,PLR0913,Too many branches,Too many arguments in f
248248
def sync_time(self, **kwargs):
249249
"""Set the system RTC via NTP using this FruitJam's Network.
250250
251-
This is a convenience wrapper for ``self.network.sync_time(...)`` so
252-
user code can simply call ``fruitjam.sync_time()``.
253-
254-
Keyword args are passed through to ``Network.sync_time``:
255-
- server (str) : NTP host (default from NTP_SERVER or pool.ntp.org)
256-
- tz_offset (float) : hours from UTC (default from NTP_TZ + NTP_DST)
257-
- timeout (float) : socket timeout seconds (default from NTP_TIMEOUT or 5.0)
258-
- cache_seconds (int) : NTP cache seconds (default from NTP_CACHE_SECONDS or 0)
259-
- require_year (int) : sanity check lower bound (default 2022)
260-
Returns:
261-
time.struct_time
251+
This is a convenience wrapper for ``self.network.sync_time(...)``.
252+
253+
:param str server: Override NTP host (defaults to ``NTP_SERVER`` or
254+
``"pool.ntp.org"`` if unset). (Pass via ``server=...`` in kwargs.)
255+
:param float tz_offset: Override hours from UTC (defaults to ``NTP_TZ``;
256+
``NTP_DST`` is still added). (Pass via ``tz_offset=...``.)
257+
:param dict tuning: Advanced options dict (optional). Supported keys:
258+
``timeout`` (float, socket timeout seconds; defaults to ``NTP_TIMEOUT`` or 5.0),
259+
``cache_seconds`` (int; defaults to ``NTP_CACHE_SECONDS`` or 0),
260+
``require_year`` (int; defaults to ``NTP_REQUIRE_YEAR`` or 2022).
261+
(Pass via ``tuning={...}``.)
262+
263+
:returns: Synced time
264+
:rtype: time.struct_time
262265
"""
263266
return self.network.sync_time(**kwargs)
264267

0 commit comments

Comments
 (0)