Skip to content
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

Make function/method deprecation checks reusable to plugins #4049

Closed
matusvalo opened this issue Jan 29, 2021 · 1 comment · Fixed by #4051, tingvarsson/telegram.ongabot#33 or hypothesis/checkmate#227
Labels
Checkers Related to a checker Enhancement ✨ Improvement to a component Proposal 📨

Comments

@matusvalo
Copy link
Collaborator

Is your feature request related to a problem? Please describe

stdlib checker contains checks for deprecated functions: https://github.com/PyCQA/pylint/blob/8649b721560ac33756792e405a6d7bbf7d331e57/pylint/checkers/stdlib.py#L112-L118
Unfortunately, there is no easy way how it can be simply reused to add support for deprecation checks in pylint plugins.

Describe the solution you'd like

One possible solution can be to move deprecation check logic to separate Mixin and provide hooks for customization. The plugin can create new checker by using the mixin and just adding small custom pieces.

Additional context

Generalizing deprecation check logic from stdlib to be reused in plugins. Ideal candidate is e.g. pyling-django.

@Pierre-Sassoulas
Copy link
Member

This sounds reasonable, I don't have a better proposition regarding the implementation itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment