From 4ebbbf8226b7ee55f5c7e0929a43239859032a09 Mon Sep 17 00:00:00 2001 From: Alex Hall Date: Thu, 2 May 2019 20:27:57 +0200 Subject: [PATCH] BaseVariable is an ABC --- pysnooper/variables.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pysnooper/variables.py b/pysnooper/variables.py index 89ba45d..d233d60 100644 --- a/pysnooper/variables.py +++ b/pysnooper/variables.py @@ -1,11 +1,12 @@ import itertools +from abc import ABC, abstractmethod from collections import Mapping, Sequence from copy import deepcopy from . import utils -class BaseVariable(object): +class BaseVariable(ABC): def __init__(self, source, exclude=()): self.source = source self.exclude = utils.ensure_tuple(exclude) @@ -18,6 +19,7 @@ class BaseVariable(object): return () return self._items(main_value) + @abstractmethod def _items(self, key): raise NotImplementedError()