mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
Default to 'full' content in __format__
...when no explicit content argument is given
This commit is contained in:
@@ -419,7 +419,10 @@ class Style(object):
|
||||
style = 'color' if cls._term_supports_color() else 'mono'
|
||||
if len(content) > 1:
|
||||
raise ValueError('cannot specify more than one content element')
|
||||
content = content.pop()
|
||||
try:
|
||||
content = content.pop()
|
||||
except KeyError:
|
||||
content = 'full'
|
||||
return cls(style == 'color'), content
|
||||
|
||||
def __call__(self, format_spec):
|
||||
|
||||
Reference in New Issue
Block a user