def _parse_battery_info(sys_path):
            """
            Extract battery information from uevent file, already convert to
            int if necessary
            """
            raw_values = {}
            with (sys_path / "uevent").open() as f:
                for var in f.read().splitlines():
                    k, v = var.split("=")
                    try:
                        raw_values[k] = int(v)
                    except ValueError:
                        raw_values[k] = v
            return raw_values

            Extract battery information from uevent file, already convert to
            int if necessary
            
py3status/modules/battery_level.py