Skip to content

Commit 91cb807

Browse files
authored
Merge pull request #131 from jepler/small-fixes
churn to appease ruff & remove debugging print
2 parents b5f9b04 + d7a80f0 commit 91cb807

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/wwvb/__init__.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ def _maybe_warn_update(dt: datetime.date, stacklevel: int = 1) -> None:
4949
# If the date is less than 300 days after today, there should be (possibly)
5050
# prospective available now.
5151
today = datetime.datetime.now(tz=datetime.timezone.utc).date()
52-
print(f"_mwu {today=!r} {dt=!r} {iersdata.end=!r}")
5352
if _date(dt) < today + datetime.timedelta(days=330):
5453
warnings.warn(
5554
"Note: Running `updateiers` may provide better DUT1 and LS information",
@@ -727,7 +726,7 @@ class WWVBMinuteIERS(WWVBMinute):
727726
@classmethod
728727
def _get_dut1_info(cls, year: int, days: int, old_time: WWVBMinute | None = None) -> tuple[int, bool]: # noqa: ARG003
729728
d = datetime.datetime(year, 1, 1, tzinfo=datetime.timezone.utc) + datetime.timedelta(days - 1)
730-
return int(round(get_dut1(d) * 10)) * 100, isls(d)
729+
return round(get_dut1(d) * 10) * 100, isls(d)
731730

732731

733732
def _bcd_bits(n: int) -> Generator[bool, None, None]:

src/wwvb/updateiers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def update_iersdata( # noqa: PLR0915
5252
offs_str = r["UT1-UTC"]
5353
if not offs_str:
5454
break
55-
offs = int(round(float(offs_str) * 10))
55+
offs = round(float(offs_str) * 10)
5656
if not offsets:
5757
table_start = datetime.date(1858, 11, 17) + datetime.timedelta(jd)
5858

@@ -98,7 +98,7 @@ def patch(patch_start: datetime.date, patch_end: datetime.date, val: int) -> Non
9898
cells = row.findAll("td")
9999
when = datetime.datetime.strptime(cells[0].text + "+0000", "%Y-%m-%d%z").date()
100100
dut1 = cells[2].text.replace("s", "").replace(" ", "")
101-
dut1 = int(round(float(dut1) * 10))
101+
dut1 = round(float(dut1) * 10)
102102
if wwvb_dut1 is not None:
103103
assert wwvb_start is not None
104104
patch(wwvb_start, when, wwvb_dut1)

0 commit comments

Comments
 (0)