Update __init__.py

blank line missing.
This commit is contained in:
Mikey Sklar 2025-08-22 18:55:00 -07:00
parent 6b86bc95a6
commit 75e5fb7ac2

View file

@ -248,17 +248,20 @@ class FruitJam(PortalBase):
def sync_time(self, **kwargs):
"""Set the system RTC via NTP using this FruitJam's Network.
This is a convenience wrapper for ``self.network.sync_time(...)`` so
user code can simply call ``fruitjam.sync_time()``.
This is a convenience wrapper for ``self.network.sync_time(...)``.
Keyword args are passed through to ``Network.sync_time``:
- server (str) : NTP host (default from NTP_SERVER or pool.ntp.org)
- tz_offset (float) : hours from UTC (default from NTP_TZ + NTP_DST)
- timeout (float) : socket timeout seconds (default from NTP_TIMEOUT or 5.0)
- cache_seconds (int) : NTP cache seconds (default from NTP_CACHE_SECONDS or 0)
- require_year (int) : sanity check lower bound (default 2022)
Returns:
time.struct_time
:param str server: Override NTP host (defaults to ``NTP_SERVER`` or
``"pool.ntp.org"`` if unset). (Pass via ``server=...`` in kwargs.)
:param float tz_offset: Override hours from UTC (defaults to ``NTP_TZ``;
``NTP_DST`` is still added). (Pass via ``tz_offset=...``.)
:param dict tuning: Advanced options dict (optional). Supported keys:
``timeout`` (float, socket timeout seconds; defaults to ``NTP_TIMEOUT`` or 5.0),
``cache_seconds`` (int; defaults to ``NTP_CACHE_SECONDS`` or 0),
``require_year`` (int; defaults to ``NTP_REQUIRE_YEAR`` or 2022).
(Pass via ``tuning={...}``.)
:returns: Synced time
:rtype: time.struct_time
"""
return self.network.sync_time(**kwargs)