From 2a5157c7fd6c9a5544d2eb1bc45f6a571e62bf8d Mon Sep 17 00:00:00 2001 From: jbannon Date: Sat, 28 May 2022 07:10:53 +0000 Subject: [PATCH] make pylint disable area smaller, remove int --- src/ytdl_sub/config/preset.py | 8 ++++---- src/ytdl_sub/validators/validators.py | 18 ------------------ 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/src/ytdl_sub/config/preset.py b/src/ytdl_sub/config/preset.py index bd6448c6..80c902e7 100644 --- a/src/ytdl_sub/config/preset.py +++ b/src/ytdl_sub/config/preset.py @@ -177,15 +177,15 @@ class Preset(StrictDictValidator): validator_dict = self._validator_dict 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): + # 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) + # pylint: enable=protected-access if isinstance(validator, OverridesStringFormatterValidator): self.__validate_override_string_formatter_validator(validator) - # pylint: enable=protected-access def __merge_parent_preset_dicts_if_present(self, config: ConfigFile): parent_presets = set() diff --git a/src/ytdl_sub/validators/validators.py b/src/ytdl_sub/validators/validators.py index 9077308a..3b9c2fc2 100644 --- a/src/ytdl_sub/validators/validators.py +++ b/src/ytdl_sub/validators/validators.py @@ -73,24 +73,6 @@ class BoolValidator(Validator): 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): """ Validates string fields.