From 3ea48899f4e1a627d093d6ce4be0a6cf9db11768 Mon Sep 17 00:00:00 2001 From: KurimuzonAkuma Date: Fri, 16 Feb 2024 17:35:40 +0300 Subject: [PATCH] Various improvements --- pyrogram/raw/core/primitives/vector.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pyrogram/raw/core/primitives/vector.py b/pyrogram/raw/core/primitives/vector.py index ed2bbb5d..873a54d0 100644 --- a/pyrogram/raw/core/primitives/vector.py +++ b/pyrogram/raw/core/primitives/vector.py @@ -33,17 +33,13 @@ class Vector(bytes, TLObject): @staticmethod def read_bare(b: BytesIO, size: int) -> Union[int, Any]: if size == 4: - e = int.from_bytes( - b.read(4), - "little" - ) - + e = int.from_bytes(b.read(4), "little") b.seek(-4, 1) - if e in (BoolFalse.ID, BoolTrue.ID): + if e in {BoolFalse.ID, BoolTrue.ID}: return Bool.read(b) - else: - return Int.read(b) + + return Int.read(b) if size == 8: return Long.read(b)