Make precommit checks happy (#5751)

This commit is contained in:
Jimmy Hedman 2023-11-15 00:38:36 +01:00 committed by GitHub
parent aecc6655db
commit cdcb25be8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -45,7 +45,7 @@ def sub(path, pattern, repl, expected_count=1):
content, count = re.subn(pattern, repl, content, flags=re.MULTILINE)
if expected_count is not None:
assert count == expected_count, f"Pattern {pattern} replacement failed!"
with open(path, "wt") as fh:
with open(path, "w") as fh:
fh.write(content)

View File

@ -1,4 +1,4 @@
from typing import Iterator
from collections.abc import Iterator
import math

View File

@ -1,5 +1,5 @@
import pytest
from mock import Mock
from unittest.mock import Mock
from esphome import cpp_helpers as ch
from esphome import const