A PyQT GUI application for converting InfoLease report outputs into Excel files. Handles parsing and summarizing. Learns where files are meant to be store and compiles monthly and yearly summaries.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
InfoLeaseExtract/venv/Lib/site-packages/openpyxl/compat/strings.py

25 lines
604 B

# Copyright (c) 2010-2022 openpyxl
from datetime import datetime
from math import isnan, isinf
import sys
VER = sys.version_info
from .numbers import NUMERIC_TYPES
def safe_string(value):
"""Safely and consistently format numeric values"""
if isinstance(value, NUMERIC_TYPES):
if isnan(value) or isinf(value):
value = ""
else:
value = "%.16g" % value
elif value is None:
value = "none"
elif isinstance(value, datetime):
value = value.isoformat()
elif not isinstance(value, str):
value = str(value)
return value