Skip to content

Commit

Permalink
!squash
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Jun 10, 2023
1 parent bf122bd commit c3d3953
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/unihan_db/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,19 +121,20 @@ def import_char(
c.kIRGHanyuDaZidian.append(k)

if "kXHC1983" in char:
for d in char["kXHC1983"]:
k = kXHC1983()
for loc in d["locations"]:
k.locations.append(
for kxhc in char["kXHC1983"]:
assert isinstance(kxhc, dict)
assert isinstance(kxhc["locations"], list)
kxhc_locations: t.List[UnhnLocationkXHC1983] = []
for loc in kxhc["locations"]:
kxhc_locations.append(
UnhnLocationkXHC1983(
page=loc["page"],
character=loc["character"],
entry=loc["entry"],
substituted=loc["substituted"],
)
)
k.readings.append(UnhnReading(reading=d["reading"]))
c.kXHC1983.append(k)
c.kXHC1983.append(kXHC1983(readings=kxhc_locations))

if "kCheungBauer" in char:
for _kcb in char["kCheungBauer"]:
Expand Down

0 comments on commit c3d3953

Please sign in to comment.