Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update pylint pre-commit hook to support py3.13 venvs #4590

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

nemacysts
Copy link
Contributor

Without this change, running pre-commit inside a Python 3.13 venv results in errors as described in pylint-dev/pylint#10000

e.g.:

************* Module telegram._bot
telegram/_bot.py:26:0: E0611: No name 'Sequence' in module 'collections.abc' (no-name-in-module)

Bumping this hook required ignoring a new check added in pylint 3.3.0: too-many-positional-arguments as there's a significant amount of violations and picking a value for --max-positional-arguments seems non-trivial as there are functions with 80+ args (e.g., Message::__init__() in telegram/_message.py)

  • run pre-commit
  • run tests
  • add self to AUTHORS.rst

Without this change, running `pre-commit` inside a Python 3.13 venv
results in errors as described in pylint-dev/pylint#10000

e.g.:
```
************* Module telegram._bot
telegram/_bot.py:26:0: E0611: No name 'Sequence' in module 'collections.abc' (no-name-in-module)
```

Bumping this hook required ignoring a new check added in pylint 3.3.0:
`too-many-positional-arguments` as there's a significant amount of
violations and picking a value for `--max-positional-arguments` seems
non-trivial as there are functions with 80+ args (e.g.,
`Message::__init__()` in `telegram/_message.py`)
@Bibo-Joshi Bibo-Joshi merged commit 3709c2f into python-telegram-bot:master Dec 4, 2024
22 checks passed
@Bibo-Joshi
Copy link
Member

Thank you for the contribution!

@Bibo-Joshi Bibo-Joshi added ⚙️ dependencies affected functionality: dependencies 🛠 code-quality change type: code-quality labels Dec 4, 2024
cuevasrja pushed a commit to USB-CI3715/python-telegram-bot that referenced this pull request Dec 9, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Dec 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🛠 code-quality change type: code-quality ⚙️ dependencies affected functionality: dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants