Skip to content

Commit 774449b

Browse files
committed
try again to fix type annotations
1 parent 78d57b0 commit 774449b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/wwvb/iersdata.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import datetime
1010
import gzip
1111
import importlib.resources
12-
import importlib.resources.abc
1312
import json
1413

1514
import platformdirs
@@ -18,17 +17,17 @@
1817

1918
content: dict[str, str] = {"START": "1970-01-01", "OFFSETS_GZ": "H4sIAFNx1mYC/wMAAAAAAAAAAAA="}
2019

21-
path: importlib.resources.abc.Traversable
20+
path = importlib.resources.files("wwvb") / "iersdata.json"
21+
content = json.loads(path.read_text(encoding="utf-8"))
2222

2323
for location in [ # pragma no branch
2424
platformdirs.user_data_path("wwvbpy", "unpythonic.net"),
2525
platformdirs.site_data_path("wwvbpy", "unpythonic.net"),
2626
]:
2727
path = location / "iersdata.json"
2828
if path.exists(): # pragma no branch
29+
content = json.loads(path.read_text(encoding="utf-8"))
2930
break
30-
else: # pragma no cover
31-
path = importlib.resources.files("wwvb") / "iersdata.json"
3231

3332
content = json.loads(path.read_text(encoding="utf-8"))
3433

0 commit comments

Comments
 (0)