num: style fixes

This commit is contained in:
Shiz 2021-06-25 19:33:00 +02:00
parent c386a5577f
commit c4ddf590a5
1 changed files with 33 additions and 12 deletions

View File

@ -48,19 +48,25 @@ class Int(Type[int]):
int8 = Int(8, endian=Endian.Little, signed=True)
uint8 = Int(8, endian=Endian.Little, signed=False)
int16le = int16 = Int(16, endian=Endian.Little, signed=True)
int16 = \
int16le = Int(16, endian=Endian.Little, signed=True)
int16be = Int(16, endian=Endian.Big, signed=True)
uint16le = uint16 = Int(16, endian=Endian.Little, signed=False)
uint16 = \
uint16le = Int(16, endian=Endian.Little, signed=False)
uint16be = Int(16, endian=Endian.Big, signed=False)
int32le = int32 = Int(32, endian=Endian.Little, signed=True)
int32 = \
int32le = Int(32, endian=Endian.Little, signed=True)
int32be = Int(32, endian=Endian.Big, signed=True)
uint32le = uint32 = Int(32, endian=Endian.Little, signed=False)
uint32 = \
uint32le = Int(32, endian=Endian.Little, signed=False)
uint32be = Int(32, endian=Endian.Big, signed=False)
int64le = int64 = Int(64, endian=Endian.Little, signed=True)
int64 = \
int64le = Int(64, endian=Endian.Little, signed=True)
int64be = Int(64, endian=Endian.Big, signed=True)
uint64le = uint64 = Int(64, endian=Endian.Little, signed=False)
uint64 = \
uint64le = Int(64, endian=Endian.Little, signed=False)
uint64be = Int(64, endian=Endian.Big, signed=False)
@ -111,9 +117,24 @@ class Float(Type[float]):
def __repr__(self) -> str:
return f'<{__name__}.{self.__class__.__name__}({self.bits!r}, {self.endian!r})>'
float16le = binary16le = float16 = binary16 = half = Float(16, endian=Endian.Little)
float16be = binary16be = Float(16, endian=Endian.Big)
float32le = binary32le = float32 = binary32 = float_ = Float(32, endian=Endian.Little)
float32be = binary32be = Float(32, endian=Endian.Big)
float64le = binary64le = float64 = binary64 = double = Float(64, endian=Endian.Little)
float64be = binary64be = Float(64, endian=Endian.Big)
half = \
float16 = \
binary16 = \
float16le = \
binary16le = Float(16, endian=Endian.Little)
float16be = \
binary16be = Float(16, endian=Endian.Big)
float_ = \
float32 = \
binary32 = \
float32le = \
binary32le = Float(32, endian=Endian.Little)
float32be = \
binary32be = Float(32, endian=Endian.Big)
double = \
float64 = \
binary64 = \
float64le = \
binary64le = Float(64, endian=Endian.Little)
float64be = \
binary64be = Float(64, endian=Endian.Big)