Coverage for users/preferences.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-10-10 18:35 +0000

1class UserPreference: 

2 """ 

3 Represents a configurable user preference. 

4 """ 

5 def __init__(self, label, choices, default=None, description='', coerce=lambda x: x, warning=''): 

6 self.label = label 

7 self.choices = choices 

8 self.default = default if default is not None else choices[0] 

9 self.description = description 

10 self.coerce = coerce 

11 self.warning = warning