Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def right(self):
return Utility.lazy_get(self, '_right', Border.Border())
def top(self):
return Utility.lazy_get(self, '_top', Border.Border())
def left(self):
return Utility.lazy_get(self, '_left', Border.Border())
def get_style_name(style):
for key, values in Border.STYLE_MAPPING.items():
if style == key or style in values:
return key
# TODO: warn the user?
return 'thin'
def bottom(self):
return Utility.lazy_get(self, '_bottom', Border.Border())
def __init__(self, color=None, style='thin'):
self._color = color
self._style = Border.get_style_name(style)