make pylint disable area smaller, remove int
This commit is contained in:
parent
d15b580c1d
commit
2a5157c7fd
2 changed files with 4 additions and 22 deletions
|
|
@ -177,15 +177,15 @@ class Preset(StrictDictValidator):
|
||||||
validator_dict = self._validator_dict
|
validator_dict = self._validator_dict
|
||||||
|
|
||||||
for validator in validator_dict.values():
|
for validator in validator_dict.values():
|
||||||
# pylint: disable=protected-access
|
|
||||||
# Usage of protected variables in other validators is fine. The reason to keep them
|
|
||||||
# protected is for readability when using them in subscriptions.
|
|
||||||
if isinstance(validator, DictValidator):
|
if isinstance(validator, DictValidator):
|
||||||
|
# pylint: disable=protected-access
|
||||||
|
# Usage of protected variables in other validators is fine. The reason to keep them
|
||||||
|
# protected is for readability when using them in subscriptions.
|
||||||
self.__recursive_preset_validate(validator._validator_dict)
|
self.__recursive_preset_validate(validator._validator_dict)
|
||||||
|
# pylint: enable=protected-access
|
||||||
|
|
||||||
if isinstance(validator, OverridesStringFormatterValidator):
|
if isinstance(validator, OverridesStringFormatterValidator):
|
||||||
self.__validate_override_string_formatter_validator(validator)
|
self.__validate_override_string_formatter_validator(validator)
|
||||||
# pylint: enable=protected-access
|
|
||||||
|
|
||||||
def __merge_parent_preset_dicts_if_present(self, config: ConfigFile):
|
def __merge_parent_preset_dicts_if_present(self, config: ConfigFile):
|
||||||
parent_presets = set()
|
parent_presets = set()
|
||||||
|
|
|
||||||
|
|
@ -73,24 +73,6 @@ class BoolValidator(Validator):
|
||||||
return self._value
|
return self._value
|
||||||
|
|
||||||
|
|
||||||
class IntValidator(Validator):
|
|
||||||
"""
|
|
||||||
Validates int fields.
|
|
||||||
"""
|
|
||||||
|
|
||||||
_expected_value_type: Type = int
|
|
||||||
_expected_value_type_name = "integer"
|
|
||||||
|
|
||||||
@property
|
|
||||||
def value(self) -> int:
|
|
||||||
"""
|
|
||||||
Returns
|
|
||||||
-------
|
|
||||||
Int value
|
|
||||||
"""
|
|
||||||
return self._value
|
|
||||||
|
|
||||||
|
|
||||||
class StringValidator(Validator):
|
class StringValidator(Validator):
|
||||||
"""
|
"""
|
||||||
Validates string fields.
|
Validates string fields.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue