pre-commit autoupdate (#3791)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
This commit is contained in:
pre-commit-ci[bot] 2023-07-06 18:57:51 +02:00 committed by GitHub
parent 589047ddbf
commit 7d52ead228
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 13 deletions

View file

@ -62,7 +62,7 @@ repos:
- cachetools~=5.3.1 - cachetools~=5.3.1
- . # this basically does `pip install -e .` - . # this basically does `pip install -e .`
- repo: https://github.com/asottile/pyupgrade - repo: https://github.com/asottile/pyupgrade
rev: v3.4.0 rev: v3.8.0
hooks: hooks:
- id: pyupgrade - id: pyupgrade
files: ^(telegram|examples|tests|docs)/.*\.py$ files: ^(telegram|examples|tests|docs)/.*\.py$
@ -76,8 +76,8 @@ repos:
args: args:
- --diff - --diff
- --check - --check
- repo: https://github.com/charliermarsh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.0.275' rev: 'v0.0.277'
hooks: hooks:
- id: ruff - id: ruff
name: ruff name: ruff

View file

@ -10,7 +10,7 @@ line_length = 99
line-length = 99 line-length = 99
target-version = "py38" target-version = "py38"
show-fixes = true show-fixes = true
ignore = ["PLR2004", "PLR0911", "PLR0912", "PLR0913", "PLR0915"] ignore = ["PLR2004", "PLR0911", "PLR0912", "PLR0913", "PLR0915", "PERF203"]
select = ["E", "F", "I", "PL", "UP", "RUF", "PTH", "C4", "B", "PIE", "SIM", "RET", "RSE", select = ["E", "F", "I", "PL", "UP", "RUF", "PTH", "C4", "B", "PIE", "SIM", "RET", "RSE",
"G", "ISC", "PT", "ASYNC", "TCH", "CPY", "SLOT", "PERF",] "G", "ISC", "PT", "ASYNC", "TCH", "CPY", "SLOT", "PERF",]

View file

@ -598,8 +598,8 @@ class Updater(AsyncContextManager["Updater"]):
""" """
_LOGGER.debug("Start network loop retry %s", description) _LOGGER.debug("Start network loop retry %s", description)
cur_interval = interval cur_interval = interval
while self.running:
try: try:
while self.running:
try: try:
if not await action_cb(): if not await action_cb():
break break
@ -627,7 +627,6 @@ class Updater(AsyncContextManager["Updater"]):
except asyncio.CancelledError: except asyncio.CancelledError:
_LOGGER.debug("Network loop retry %s was cancelled", description) _LOGGER.debug("Network loop retry %s was cancelled", description)
break
async def _bootstrap( async def _bootstrap(
self, self,

View file

@ -179,10 +179,7 @@ def parse_table(h4) -> List[List[str]]:
table = find_next_sibling_until(h4, "table", h4.find_next_sibling("h4")) table = find_next_sibling_until(h4, "table", h4.find_next_sibling("h4"))
if not table: if not table:
return [] return []
t = [] return [[td.text for td in tr.find_all("td")] for tr in table.find_all("tr")[1:]]
for tr in table.find_all("tr")[1:]:
t.append([td.text for td in tr.find_all("td")])
return t
def check_method(h4): def check_method(h4):