bacommon.build
Functionality related to game builds.
1# Released under the MIT License. See LICENSE for details. 2# 3"""Functionality related to game builds.""" 4 5from __future__ import annotations 6 7import datetime 8from dataclasses import dataclass, field 9from typing import TYPE_CHECKING, Annotated 10 11from efro.dataclassio import ioprepped, IOAttrs 12 13if TYPE_CHECKING: 14 pass 15 16 17@ioprepped 18@dataclass 19class BuildInfoSet: 20 """Set of build infos.""" 21 22 @dataclass 23 class Entry: 24 """Info about a particular app build.""" 25 26 filename: Annotated[str, IOAttrs('fname')] 27 size: Annotated[int, IOAttrs('size')] 28 version: Annotated[str, IOAttrs('version')] 29 build_number: Annotated[int, IOAttrs('build')] 30 checksum: Annotated[str, IOAttrs('checksum')] 31 createtime: Annotated[datetime.datetime, IOAttrs('createtime')] 32 33 builds: Annotated[list[Entry], IOAttrs('builds')] = field( 34 default_factory=list 35 )
@ioprepped
@dataclass
class
BuildInfoSet:
18@ioprepped 19@dataclass 20class BuildInfoSet: 21 """Set of build infos.""" 22 23 @dataclass 24 class Entry: 25 """Info about a particular app build.""" 26 27 filename: Annotated[str, IOAttrs('fname')] 28 size: Annotated[int, IOAttrs('size')] 29 version: Annotated[str, IOAttrs('version')] 30 build_number: Annotated[int, IOAttrs('build')] 31 checksum: Annotated[str, IOAttrs('checksum')] 32 createtime: Annotated[datetime.datetime, IOAttrs('createtime')] 33 34 builds: Annotated[list[Entry], IOAttrs('builds')] = field( 35 default_factory=list 36 )
Set of build infos.
BuildInfoSet( builds: Annotated[list[BuildInfoSet.Entry], <efro.dataclassio.IOAttrs object>] = <factory>)
builds: Annotated[list[BuildInfoSet.Entry], <efro.dataclassio.IOAttrs object at 0x104309520>]
@dataclass
class
BuildInfoSet.Entry:
23 @dataclass 24 class Entry: 25 """Info about a particular app build.""" 26 27 filename: Annotated[str, IOAttrs('fname')] 28 size: Annotated[int, IOAttrs('size')] 29 version: Annotated[str, IOAttrs('version')] 30 build_number: Annotated[int, IOAttrs('build')] 31 checksum: Annotated[str, IOAttrs('checksum')] 32 createtime: Annotated[datetime.datetime, IOAttrs('createtime')]
Info about a particular app build.
BuildInfoSet.Entry( filename: Annotated[str, <efro.dataclassio.IOAttrs object>], size: Annotated[int, <efro.dataclassio.IOAttrs object>], version: Annotated[str, <efro.dataclassio.IOAttrs object>], build_number: Annotated[int, <efro.dataclassio.IOAttrs object>], checksum: Annotated[str, <efro.dataclassio.IOAttrs object>], createtime: Annotated[datetime.datetime, <efro.dataclassio.IOAttrs object>])
filename: Annotated[str, <efro.dataclassio.IOAttrs object at 0x10402ac60>]
size: Annotated[int, <efro.dataclassio.IOAttrs object at 0x10430be00>]
version: Annotated[str, <efro.dataclassio.IOAttrs object at 0x104308140>]
build_number: Annotated[int, <efro.dataclassio.IOAttrs object at 0x1043086b0>]
checksum: Annotated[str, <efro.dataclassio.IOAttrs object at 0x104309d90>]
createtime: Annotated[datetime.datetime, <efro.dataclassio.IOAttrs object at 0x104308320>]