From f35f9d54344ff82d39936ebd7e11a53e7c3ac1f8 Mon Sep 17 00:00:00 2001 From: alemidev Date: Sat, 15 Jan 2022 20:55:15 +0100 Subject: [PATCH] specify is not None --- aiocraft/mc/definitions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiocraft/mc/definitions.py b/aiocraft/mc/definitions.py index 2258806..b0d4019 100644 --- a/aiocraft/mc/definitions.py +++ b/aiocraft/mc/definitions.py @@ -126,7 +126,7 @@ class Enchantment: level : int def __init__(self, type:EnchantmentType=None, id:int=None, lvl:int=1): - if not type and not id: + if type is None and id is None: raise ValueError("No enchantment type or enchantment id provided") self.type = type or EnchantmentType(id) self.eid = self.type.value