Skip to content

Commit

Permalink
Bump pylint from 2.13.9 to 2.14.3 (esphome#3589)
Browse files Browse the repository at this point in the history
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <[email protected]>
  • Loading branch information
dependabot[bot] and jesserockz authored Jun 21, 2022
1 parent 311a48c commit 29045b0
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 16 deletions.
6 changes: 3 additions & 3 deletions esphome/components/time/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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 {}",
)
}

Expand Down
14 changes: 6 additions & 8 deletions esphome/config_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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


Expand All @@ -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("#")
Expand All @@ -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

Expand Down
1 change: 0 additions & 1 deletion esphome/espota2.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ def update(self, progress):
sys.stderr.write(text)
sys.stderr.flush()

# pylint: disable=no-self-use
def done(self):
sys.stderr.write("\n")
sys.stderr.flush()
Expand Down
1 change: 0 additions & 1 deletion esphome/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ def write(self, s):
# any caller.
return len(s)

# pylint: disable=no-self-use
def isatty(self):
return True

Expand Down
2 changes: 1 addition & 1 deletion esphome/wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 0 additions & 1 deletion pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ disable=
undefined-loop-variable,
useless-object-inheritance,
stop-iteration-return,
no-self-use,
import-outside-toplevel,
# Broken
unsupported-membership-test,
Expand Down
2 changes: 1 addition & 1 deletion requirements_test.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pylint==2.13.9
pylint==2.14.3
flake8==4.0.1
black==22.3.0
pyupgrade==2.32.1
Expand Down

0 comments on commit 29045b0

Please sign in to comment.