Skip to content

Commit

Permalink
+types
Browse files Browse the repository at this point in the history
  • Loading branch information
gdraheim committed Jul 10, 2024
1 parent 2f4e57d commit 2c0c928
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tabxlsx.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,9 @@ def load_workbook(filename: str) -> Workbook:
value1 = float(v)
value = value1
if s in numberformat:
fmt = numberformat[s]
logg.debug("value %s numberformat %s", value, fmt)
if fmt in _timeformats:
numfmt = numberformat[s]
logg.debug("value %s numberformat %s", value, numfmt)
if numfmt in _timeformats:
value0 = int(value1)
value2 = Time.fromordinal(value0 + 693594)
value3 = int(((value1 - value0) * 86400) + 0.4)
Expand Down Expand Up @@ -479,7 +479,7 @@ def sortkey(header: str) -> str:
def sortrow(row: Dict[str, CellValue]) -> str:
def asdict(item: Dict[str, CellValue]) -> Dict[str, CellValue]:
if hasattr(item, "_asdict"):
return item._asdict() # type: ignore[union-attr, no-any-return, arg-type]
return item._asdict() # type: ignore[union-attr, no-any-return, arg-type, attr-defined]
return item
item = asdict(row)
sorts = sortheaders
Expand Down Expand Up @@ -666,7 +666,7 @@ def format(name: str, val: CellValue) -> str:
return strValue(val)
def asdict(item: Dict[str, CellValue]) -> Dict[str, CellValue]:
if hasattr(item, "_asdict"):
return item._asdict() # type: ignore[union-attr, no-any-return, arg-type]
return item._asdict() # type: ignore[union-attr, no-any-return, arg-type, attr-defined]
return item
cols: Dict[str, int] = {}
for item in data:
Expand Down

0 comments on commit 2c0c928

Please sign in to comment.