| Total Complexity | 1 |
| Total Lines | 11 |
| Duplicated Lines | 0 % |
| Coverage | 50% |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | 1 | from ..forms import LocalizedCharFieldForm |
|
| 6 | 1 | class LocalizedCharField(LocalizedField): |
|
| 7 | 1 | attr_class = LocalizedStringValue |
|
| 8 | |||
| 9 | 1 | def formfield(self, **kwargs): |
|
| 10 | """Gets the form field associated with this field.""" |
||
| 11 | defaults = { |
||
| 12 | 'form_class': LocalizedCharFieldForm |
||
| 13 | } |
||
| 14 | |||
| 15 | defaults.update(kwargs) |
||
| 16 | return super().formfield(**defaults) |
||
|
|
|||
| 17 |
Generally, there is nothing wrong with usage of
*or**arguments. For readability of the code base, we suggest to not over-use these language constructs though.For more information, we can recommend this blog post from Ned Batchelder including its comments which also touches this aspect.