@@ -18,12 +18,12 @@ class EmptyConfigurationError(Exception):
1818
1919def validate_profile (profile ):
2020 if not is_existing_profile (profile ):
21- raise ValidationError ("Invalid profile provided: {}" . format ( profile ) )
21+ raise ValidationError (f "Invalid profile provided: { profile } " )
2222
2323
2424def validate_region (region ):
2525 if not is_existing_region (region ):
26- raise ValidationError ("Invalid region name provided: {}" . format ( region ) )
26+ raise ValidationError (f "Invalid region name provided: { region } " )
2727
2828
2929def validate_defaults (data ):
@@ -45,9 +45,9 @@ class HostSchema(Schema):
4545
4646class GateConfigSchema (Schema ):
4747 defaults = fields .Nested (
48- DefaultsSchema , required = False , missing = dict () , validate = validate_defaults
48+ DefaultsSchema , required = False , missing = {} , validate = validate_defaults
4949 )
50- hosts = fields .List (fields .Nested (HostSchema ), required = False , missing = list () )
50+ hosts = fields .List (fields .Nested (HostSchema ), required = False , missing = [] )
5151
5252 # pylint: disable=no-self-use,unused-argument
5353 @post_load
@@ -115,9 +115,7 @@ def _merge_data(src, dst):
115115 dst [key ] = src [key ]
116116 else :
117117 raise TypeError (
118- "Cannot merge {} with dict, src={} dst={}" .format (
119- type (src ).__name__ , src , dst
120- )
118+ f"Cannot merge { type (src ).__name__ } with dict, src={ src } dst={ dst } "
121119 )
122120
123121 elif isinstance (dst , list ):
0 commit comments