File tree Expand file tree Collapse file tree 4 files changed +9
-4
lines changed Expand file tree Collapse file tree 4 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,8 @@ def _try_coerce(
141141 type (values (self .enum )[0 ])
142142 ):
143143 raise ValueError (
144- f"'{ value } ' is not a valid { self .enum .__name__ } "
144+ f"'{ value } ' is not a valid "
145+ f"{ self .enum .__name__ } "
145146 f"required by field { self .name } ."
146147 ) from err
147148 return value
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ class EnumChoiceField(TypedChoiceField):
6767 enum_ : Optional [Type [Enum ]] = None
6868 strict_ : bool = True
6969 empty_value : Any = ''
70- empty_values : List [Any ]
70+ empty_values : List [Any ] = TypedChoiceField . empty_values
7171 choices : Iterable [Tuple [Any , Any ]]
7272
7373 @property
@@ -114,7 +114,7 @@ def __init__(
114114 * ,
115115 empty_value : Any = _Unspecified ,
116116 strict : bool = strict_ ,
117- empty_values : List [Any ] = TypedChoiceField . empty_values ,
117+ empty_values : List [Any ] = empty_values . copy () ,
118118 choices : Iterable [Tuple [Any , str ]] = (),
119119 ** kwargs
120120 ):
Original file line number Diff line number Diff line change @@ -55,7 +55,10 @@ isort = "^5.6.4"
5555doc8 = " ^0.11.0"
5656darglint = " ^1.5.7"
5757pytest-cov = " ^4.0.0"
58- pylint = " ^2.6.0"
58+ pylint = [
59+ { version = " <3.0" , markers = " python_version <= '3.7'" },
60+ { version = " ^3.0" , markers = " python_version > '3.7'" },
61+ ]
5962sphinx-argparse = " ^0.3.0"
6063deepdiff = " >=5.2.3,<7.0.0"
6164safety = " ^2.0.0"
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ valid-metaclass-classmethod-first-arg = mcs
1111
1212[pylint.DESIGN]
1313max-branches =15
14+ max-args =6
1415
1516[pylint.MASTER]
1617ignore =tests
You can’t perform that action at this time.
0 commit comments