mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-21 22:56:38 +01:00
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:
parent
589047ddbf
commit
7d52ead228
4 changed files with 9 additions and 13 deletions
|
@ -62,7 +62,7 @@ repos:
|
|||
- cachetools~=5.3.1
|
||||
- . # this basically does `pip install -e .`
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v3.4.0
|
||||
rev: v3.8.0
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
files: ^(telegram|examples|tests|docs)/.*\.py$
|
||||
|
@ -76,8 +76,8 @@ repos:
|
|||
args:
|
||||
- --diff
|
||||
- --check
|
||||
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
||||
rev: 'v0.0.275'
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: 'v0.0.277'
|
||||
hooks:
|
||||
- id: ruff
|
||||
name: ruff
|
||||
|
|
|
@ -10,7 +10,7 @@ line_length = 99
|
|||
line-length = 99
|
||||
target-version = "py38"
|
||||
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",
|
||||
"G", "ISC", "PT", "ASYNC", "TCH", "CPY", "SLOT", "PERF",]
|
||||
|
||||
|
|
|
@ -598,8 +598,8 @@ class Updater(AsyncContextManager["Updater"]):
|
|||
"""
|
||||
_LOGGER.debug("Start network loop retry %s", description)
|
||||
cur_interval = interval
|
||||
while self.running:
|
||||
try:
|
||||
try:
|
||||
while self.running:
|
||||
try:
|
||||
if not await action_cb():
|
||||
break
|
||||
|
@ -625,9 +625,8 @@ class Updater(AsyncContextManager["Updater"]):
|
|||
if cur_interval:
|
||||
await asyncio.sleep(cur_interval)
|
||||
|
||||
except asyncio.CancelledError:
|
||||
_LOGGER.debug("Network loop retry %s was cancelled", description)
|
||||
break
|
||||
except asyncio.CancelledError:
|
||||
_LOGGER.debug("Network loop retry %s was cancelled", description)
|
||||
|
||||
async def _bootstrap(
|
||||
self,
|
||||
|
|
|
@ -179,10 +179,7 @@ def parse_table(h4) -> List[List[str]]:
|
|||
table = find_next_sibling_until(h4, "table", h4.find_next_sibling("h4"))
|
||||
if not table:
|
||||
return []
|
||||
t = []
|
||||
for tr in table.find_all("tr")[1:]:
|
||||
t.append([td.text for td in tr.find_all("td")])
|
||||
return t
|
||||
return [[td.text for td in tr.find_all("td")] for tr in table.find_all("tr")[1:]]
|
||||
|
||||
|
||||
def check_method(h4):
|
||||
|
|
Loading…
Reference in a new issue