IntEnum was needed

This commit is contained in:
Kovid Goyal 2021-04-19 17:09:23 +05:30
parent ea11ce8664
commit 379add8d6f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -8,7 +8,7 @@ import sys
from base64 import standard_b64encode
from collections import defaultdict, deque
from contextlib import suppress
from enum import Enum
from enum import IntEnum
from itertools import count
from typing import (
Any, Callable, DefaultDict, Deque, Dict, Iterator, List, Optional,
@ -32,7 +32,7 @@ except Exception:
fsenc = 'utf-8'
class Dispose(Enum):
class Dispose(IntEnum):
undefined = 0
none = 1
background = 2
@ -75,7 +75,7 @@ class Frame:
def __repr__(self) -> str:
canvas = f'{self.canvas_width}x{self.canvas_height}:{self.canvas_x}+{self.canvas_y}'
geom = f'{self.width}x{self.height}'
return f'Frame(index={self.index}, gap={self.gap}, geom={geom}, canvas={canvas}, dispose={self.dispose})'
return f'Frame(index={self.index}, gap={self.gap}, geom={geom}, canvas={canvas}, dispose={self.dispose.name})'
class ImageData: