mirror of
https://github.com/cool-RR/PySnooper.git
synced 2026-01-23 10:15:11 +00:00
BaseVariable is an ABC
This commit is contained in:
parent
e3688e4b63
commit
4ebbbf8226
1 changed files with 3 additions and 1 deletions
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue