diff --git a/esphome/components/time/__init__.py b/esphome/components/time/__init__.py index 2d73d0aef9..b2be11611d 100644 --- a/esphome/components/time/__init__.py +++ b/esphome/components/time/__init__.py @@ -126,10 +126,10 @@ def _parse_cron_part(part, min_value, max_value, special_mapping): ) begin, end = data begin_n = _parse_cron_int( - begin, special_mapping, "Number for time range must be integer, " "got {}" + begin, special_mapping, "Number for time range must be integer, got {}" ) end_n = _parse_cron_int( - end, special_mapping, "Number for time range must be integer, " "got {}" + end, special_mapping, "Number for time range must be integer, got {}" ) if end_n < begin_n: return set(range(end_n, max_value + 1)) | set(range(min_value, begin_n + 1)) @@ -139,7 +139,7 @@ def _parse_cron_part(part, min_value, max_value, special_mapping): _parse_cron_int( part, special_mapping, - "Number for time expression must be an " "integer, got {}", + "Number for time expression must be an integer, got {}", ) } diff --git a/esphome/config_validation.py b/esphome/config_validation.py index c4cb916e57..0ff0ba83d9 100644 --- a/esphome/config_validation.py +++ b/esphome/config_validation.py @@ -972,9 +972,9 @@ def ipv4(value): elif isinstance(value, IPAddress): return value else: - raise Invalid("IPv4 address must consist of either string or " "integer list") + raise Invalid("IPv4 address must consist of either string or integer list") if len(parts) != 4: - raise Invalid("IPv4 address must consist of four point-separated " "integers") + raise Invalid("IPv4 address must consist of four point-separated integers") parts_ = list(map(int, parts)) if not all(0 <= x < 256 for x in parts_): raise Invalid("IPv4 address parts must be in range from 0 to 255") @@ -994,10 +994,10 @@ def _valid_topic(value): raise Invalid("MQTT topic name/filter must not be empty.") if len(raw_value) > 65535: raise Invalid( - "MQTT topic name/filter must not be longer than " "65535 encoded bytes." + "MQTT topic name/filter must not be longer than 65535 encoded bytes." ) if "\0" in value: - raise Invalid("MQTT topic name/filter must not contain null " "character.") + raise Invalid("MQTT topic name/filter must not contain null character.") return value @@ -1009,7 +1009,7 @@ def subscribe_topic(value): i < len(value) - 1 and value[i + 1] != "/" ): raise Invalid( - "Single-level wildcard must occupy an entire " "level of the filter" + "Single-level wildcard must occupy an entire level of the filter" ) index = value.find("#") @@ -1021,9 +1021,7 @@ def subscribe_topic(value): "character in the topic filter." ) if len(value) > 1 and value[index - 1] != "/": - raise Invalid( - "Multi-level wildcard must be after a topic " "level separator." - ) + raise Invalid("Multi-level wildcard must be after a topic level separator.") return value diff --git a/esphome/espota2.py b/esphome/espota2.py index 8f299395dd..76f3b917c9 100644 --- a/esphome/espota2.py +++ b/esphome/espota2.py @@ -60,7 +60,6 @@ class ProgressBar: sys.stderr.write(text) sys.stderr.flush() - # pylint: disable=no-self-use def done(self): sys.stderr.write("\n") sys.stderr.flush() diff --git a/esphome/util.py b/esphome/util.py index 9975f5fc72..927c50fe89 100644 --- a/esphome/util.py +++ b/esphome/util.py @@ -152,7 +152,6 @@ class RedirectText: # any caller. return len(s) - # pylint: disable=no-self-use def isatty(self): return True diff --git a/esphome/wizard.py b/esphome/wizard.py index 469219300b..602f4ecf04 100644 --- a/esphome/wizard.py +++ b/esphome/wizard.py @@ -343,7 +343,7 @@ def wizard(path): sleep(1) safe_print_step(3, WIFI_BIG) - safe_print("In this step, I'm going to create the configuration for " "WiFi.") + safe_print("In this step, I'm going to create the configuration for WiFi.") safe_print() sleep(1) safe_print( diff --git a/pylintrc b/pylintrc index 8f2e9a7359..b70e5c7da9 100644 --- a/pylintrc +++ b/pylintrc @@ -24,7 +24,6 @@ disable= undefined-loop-variable, useless-object-inheritance, stop-iteration-return, - no-self-use, import-outside-toplevel, # Broken unsupported-membership-test, diff --git a/requirements_test.txt b/requirements_test.txt index 7c21979647..776fef4573 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,4 +1,4 @@ -pylint==2.13.9 +pylint==2.14.3 flake8==4.0.1 black==22.3.0 pyupgrade==2.32.1