Skip to content

Commit

Permalink
Zipinfo -> ZipInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf committed Aug 11, 2020
1 parent fdb2c20 commit 733cf84
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions chess/gaviota.py
Original file line number Diff line number Diff line change
Expand Up @@ -1521,7 +1521,7 @@ def __init__(self, white_squares: List[int], white_types: List[chess.PieceType],


@dataclasses.dataclass
class Zipinfo:
class ZipInfo:
extraoffset: int
totalblocks: int
blockindex: List[int]
Expand All @@ -1534,7 +1534,7 @@ def __init__(self) -> None:
self.available_tables: Dict[str, str] = {}

self.streams: Dict[str, BinaryIO] = {}
self.zipinfo: Dict[str, Zipinfo] = {}
self.zipinfo: Dict[str, ZipInfo] = {}

self.block_cache: Dict[Tuple[str, int, int], TableBlock] = {}
self.block_age = 0
Expand Down Expand Up @@ -1871,7 +1871,7 @@ def _tb_probe(self, req: Request) -> int:

return dtm

def egtb_loadindexes(self, egkey: str, stream: BinaryIO) -> Zipinfo:
def egtb_loadindexes(self, egkey: str, stream: BinaryIO) -> ZipInfo:
zipinfo = self.zipinfo.get(egkey)

if zipinfo is None:
Expand All @@ -1887,7 +1887,7 @@ def egtb_loadindexes(self, egkey: str, stream: BinaryIO) -> Zipinfo:
IndexStruct = struct.Struct("<" + "I" * n_idx)
p = list(IndexStruct.unpack(stream.read(IndexStruct.size)))

zipinfo = Zipinfo(extraoffset=0, totalblocks=n_idx, blockindex=p)
zipinfo = ZipInfo(extraoffset=0, totalblocks=n_idx, blockindex=p)
self.zipinfo[egkey] = zipinfo

return zipinfo
Expand Down

0 comments on commit 733cf84

Please sign in to comment.