From 204a308be0f741726b9a620d88fbc22b22124c81 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Fri, 29 Dec 2023 18:55:37 +0000 Subject: Namespace all modules under gn2. We move all modules under a gn2 directory. This is important for "correct" packaging and deployment as a Guix service. --- wqflask/utility/__init__.py | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 wqflask/utility/__init__.py (limited to 'wqflask/utility/__init__.py') diff --git a/wqflask/utility/__init__.py b/wqflask/utility/__init__.py deleted file mode 100644 index 25273fa0..00000000 --- a/wqflask/utility/__init__.py +++ /dev/null @@ -1,35 +0,0 @@ -from pprint import pformat as pf - -# Todo: Move these out of __init__ - - -class Bunch: - """Like a dictionary but using object notation""" - - def __init__(self, **kw): - self.__dict__ = kw - - def __repr__(self): - return pf(self.__dict__) - - -class Struct: - '''The recursive class for building and representing objects with. - - From http://stackoverflow.com/a/6573827/1175849 - - ''' - - def __init__(self, obj): - for k, v in list(obj.items()): - if isinstance(v, dict): - setattr(self, k, Struct(v)) - else: - setattr(self, k, v) - - def __getitem__(self, val): - return self.__dict__[val] - - def __repr__(self): - return '{%s}' % str(', '.join('%s : %s' % (k, repr(v)) for - (k, v) in list(self.__dict__.items()))) -- cgit v1.2.3