mirror of
https://github.com/esphome/esphome.git
synced 2024-11-25 00:18:11 +01:00
Bump pylint from 2.13.9 to 2.14.3 (#3589)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
parent
311a48c64e
commit
29045b0435
7 changed files with 11 additions and 16 deletions
|
@ -126,10 +126,10 @@ def _parse_cron_part(part, min_value, max_value, special_mapping):
|
||||||
)
|
)
|
||||||
begin, end = data
|
begin, end = data
|
||||||
begin_n = _parse_cron_int(
|
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_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:
|
if end_n < begin_n:
|
||||||
return set(range(end_n, max_value + 1)) | set(range(min_value, begin_n + 1))
|
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(
|
_parse_cron_int(
|
||||||
part,
|
part,
|
||||||
special_mapping,
|
special_mapping,
|
||||||
"Number for time expression must be an " "integer, got {}",
|
"Number for time expression must be an integer, got {}",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -972,9 +972,9 @@ def ipv4(value):
|
||||||
elif isinstance(value, IPAddress):
|
elif isinstance(value, IPAddress):
|
||||||
return value
|
return value
|
||||||
else:
|
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:
|
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))
|
parts_ = list(map(int, parts))
|
||||||
if not all(0 <= x < 256 for x in parts_):
|
if not all(0 <= x < 256 for x in parts_):
|
||||||
raise Invalid("IPv4 address parts must be in range from 0 to 255")
|
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.")
|
raise Invalid("MQTT topic name/filter must not be empty.")
|
||||||
if len(raw_value) > 65535:
|
if len(raw_value) > 65535:
|
||||||
raise Invalid(
|
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:
|
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
|
return value
|
||||||
|
|
||||||
|
|
||||||
|
@ -1009,7 +1009,7 @@ def subscribe_topic(value):
|
||||||
i < len(value) - 1 and value[i + 1] != "/"
|
i < len(value) - 1 and value[i + 1] != "/"
|
||||||
):
|
):
|
||||||
raise Invalid(
|
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("#")
|
index = value.find("#")
|
||||||
|
@ -1021,9 +1021,7 @@ def subscribe_topic(value):
|
||||||
"character in the topic filter."
|
"character in the topic filter."
|
||||||
)
|
)
|
||||||
if len(value) > 1 and value[index - 1] != "/":
|
if len(value) > 1 and value[index - 1] != "/":
|
||||||
raise Invalid(
|
raise Invalid("Multi-level wildcard must be after a topic level separator.")
|
||||||
"Multi-level wildcard must be after a topic " "level separator."
|
|
||||||
)
|
|
||||||
|
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,6 @@ class ProgressBar:
|
||||||
sys.stderr.write(text)
|
sys.stderr.write(text)
|
||||||
sys.stderr.flush()
|
sys.stderr.flush()
|
||||||
|
|
||||||
# pylint: disable=no-self-use
|
|
||||||
def done(self):
|
def done(self):
|
||||||
sys.stderr.write("\n")
|
sys.stderr.write("\n")
|
||||||
sys.stderr.flush()
|
sys.stderr.flush()
|
||||||
|
|
|
@ -152,7 +152,6 @@ class RedirectText:
|
||||||
# any caller.
|
# any caller.
|
||||||
return len(s)
|
return len(s)
|
||||||
|
|
||||||
# pylint: disable=no-self-use
|
|
||||||
def isatty(self):
|
def isatty(self):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
|
@ -343,7 +343,7 @@ def wizard(path):
|
||||||
sleep(1)
|
sleep(1)
|
||||||
|
|
||||||
safe_print_step(3, WIFI_BIG)
|
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()
|
safe_print()
|
||||||
sleep(1)
|
sleep(1)
|
||||||
safe_print(
|
safe_print(
|
||||||
|
|
1
pylintrc
1
pylintrc
|
@ -24,7 +24,6 @@ disable=
|
||||||
undefined-loop-variable,
|
undefined-loop-variable,
|
||||||
useless-object-inheritance,
|
useless-object-inheritance,
|
||||||
stop-iteration-return,
|
stop-iteration-return,
|
||||||
no-self-use,
|
|
||||||
import-outside-toplevel,
|
import-outside-toplevel,
|
||||||
# Broken
|
# Broken
|
||||||
unsupported-membership-test,
|
unsupported-membership-test,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
pylint==2.13.9
|
pylint==2.14.3
|
||||||
flake8==4.0.1
|
flake8==4.0.1
|
||||||
black==22.3.0
|
black==22.3.0
|
||||||
pyupgrade==2.32.1
|
pyupgrade==2.32.1
|
||||||
|
|
Loading…
Reference in a new issue