Fix: Return default style value for unknown keys
Introduced with (Fix: Do not provide default 'types' if user set
'codes').
This is not a user visible bug because we only use keys defined in the
default settings.
@@ -68,8 +68,8 @@ def get_value_(key, linter, code, error_type, default):
for style_definition in linter_styles:
# For linter_styles, do not auto fill 'types' if the user already
# provided 'codes'
- default = [] if 'codes' in style_definition else [error_type]
- if error_type in style_definition.get('types', default):
+ default_ = [] if 'codes' in style_definition else [error_type]
+ if error_type in style_definition.get('types', default_):
try:
return style_definition[key]
except KeyError:
