mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 14:46:03 +00:00
Also make deserialization robust against bools
This commit is contained in:
parent
a8de8e45b0
commit
3fbdeedfa7
1 changed files with 2 additions and 1 deletions
|
|
@ -76,7 +76,8 @@ class TallLayoutOpts(LayoutOpts):
|
|||
self.bias = int(data.get('bias', 50))
|
||||
except Exception:
|
||||
self.bias = 50
|
||||
self.mirrored = to_bool(data.get('mirrored', 'false'))
|
||||
rv: bool | str = data.get('mirrored', 'false')
|
||||
self.mirrored = to_bool(rv) if isinstance(rv, str) else bool(rv)
|
||||
|
||||
def serialized(self) -> dict[str, Any]:
|
||||
return {'full_size': self.full_size, 'bias': self.bias, 'mirrored': 'y' if self.mirrored else 'n'}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue