From 7aa52f5941e4aa5fe8ad487a0b8f505c13bb981a Mon Sep 17 00:00:00 2001 From: Ville Brofeldt Date: Wed, 3 May 2023 10:20:42 +0300 Subject: [PATCH] use ellipsis --- superset/key_value/types.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/superset/key_value/types.py b/superset/key_value/types.py index 6f598f24f19e0..07d06414f60ea 100644 --- a/superset/key_value/types.py +++ b/superset/key_value/types.py @@ -18,7 +18,7 @@ import json import pickle -from abc import ABC +from abc import ABC, abstractmethod from dataclasses import dataclass from enum import Enum from typing import Any, Optional, TypedDict @@ -50,11 +50,13 @@ class SharedKey(str, Enum): class KeyValueCodec(ABC): + @abstractmethod def encode(self, value: Any) -> bytes: - raise NotImplementedError() + ... + @abstractmethod def decode(self, value: bytes) -> Any: - raise NotImplementedError() + ... class JsonKeyValueCodec(KeyValueCodec):