Passed
Push — master ( f7c14f...06873a )
by Swen
02:26
created

LocalizedTextField.formfield()   A

Complexity

Conditions 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1.4218

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 9
rs 9.6666
ccs 1
cts 4
cp 0.25
cc 1
crap 1.4218
1 1
from ..forms import LocalizedTextFieldForm
2 1
from .char_field import LocalizedCharField
3
4
5 1
class LocalizedTextField(LocalizedCharField):
6 1
    def formfield(self, **kwargs):
7
        """Gets the form field associated with this field."""
8
9
        defaults = {
10
            'form_class': LocalizedTextFieldForm
11
        }
12
13
        defaults.update(kwargs)
14
        return super().formfield(**defaults)
0 ignored issues
show
Coding Style introduced by
Usage of * or ** arguments should usually be done with care.

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.

Loading history...
15