Update pre-commit Dependencies (#3916)

This commit is contained in:
Harshil 2023-10-03 16:17:42 +04:00 committed by GitHub
parent 0e90deafb5
commit 8d76087bed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 10 deletions

View file

@ -6,7 +6,7 @@ ci:
repos:
- repo: https://github.com/psf/black
rev: 23.7.0
rev: 23.9.1
hooks:
- id: black
args:
@ -17,7 +17,7 @@ repos:
hooks:
- id: flake8
- repo: https://github.com/PyCQA/pylint
rev: v3.0.0a7
rev: v3.0.0
hooks:
- id: pylint
files: ^(telegram|examples)/.*\.py$
@ -62,7 +62,7 @@ repos:
- cachetools~=5.3.1
- . # this basically does `pip install -e .`
- repo: https://github.com/asottile/pyupgrade
rev: v3.10.1
rev: v3.13.0
hooks:
- id: pyupgrade
files: ^(telegram|examples|tests|docs)/.*\.py$
@ -77,7 +77,7 @@ repos:
- --diff
- --check
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.0.287'
rev: 'v0.0.292'
hooks:
- id: ruff
name: ruff

View file

@ -12,10 +12,9 @@ target-version = "py38"
show-fixes = true
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", "PYI"]
"G", "ISC", "PT", "ASYNC", "TCH", "SLOT", "PERF", "PYI", "FLY", "AIR"]
# Add "FURB" after it's out of preview
[tool.ruff.per-file-ignores]
"tests/*.py" = ["B018"]
"**/__init__.py" = ["CPY001"]
"examples/**.py" = ["CPY001"]
"tests/**.py" = ["RUF012"]

View file

@ -36,12 +36,16 @@ def inline_keyboard_button():
url=TestInlineKeyboardButtonBase.url,
callback_data=TestInlineKeyboardButtonBase.callback_data,
switch_inline_query=TestInlineKeyboardButtonBase.switch_inline_query,
switch_inline_query_current_chat=TestInlineKeyboardButtonBase.switch_inline_query_current_chat, # noqa: E501
switch_inline_query_current_chat=(
TestInlineKeyboardButtonBase.switch_inline_query_current_chat
),
callback_game=TestInlineKeyboardButtonBase.callback_game,
pay=TestInlineKeyboardButtonBase.pay,
login_url=TestInlineKeyboardButtonBase.login_url,
web_app=TestInlineKeyboardButtonBase.web_app,
switch_inline_query_chosen_chat=TestInlineKeyboardButtonBase.switch_inline_query_chosen_chat, # noqa: E501
switch_inline_query_chosen_chat=(
TestInlineKeyboardButtonBase.switch_inline_query_chosen_chat
),
)

View file

@ -43,7 +43,9 @@ def input_invoice_message_content():
need_phone_number=TestInputInvoiceMessageContentBase.need_phone_number,
need_email=TestInputInvoiceMessageContentBase.need_email,
need_shipping_address=TestInputInvoiceMessageContentBase.need_shipping_address,
send_phone_number_to_provider=TestInputInvoiceMessageContentBase.send_phone_number_to_provider, # noqa: E501
send_phone_number_to_provider=(
TestInputInvoiceMessageContentBase.send_phone_number_to_provider
),
send_email_to_provider=TestInputInvoiceMessageContentBase.send_email_to_provider,
is_flexible=TestInputInvoiceMessageContentBase.is_flexible,
)