-
Notifications
You must be signed in to change notification settings - Fork 3
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
Exploring the possibility of adding support for mypy and static analysis tools #445
Comments
from GPT Yes, it’s possible to define custom rules for pyright, mypy, and pylint in a Python package to catch deprecated or removed method calls like .filter(). Here’s how you can approach it:
Example mypy plugin snippet:
• This will make mypy emit an error when .filter() is used.
Example stub file (typed_ffmpeg.pyi)
• This prevents .filter() from being recognized as a valid method.
Example pylint plugin:
• This can be installed as a custom pylint rule. Conclusion Yes, it is absolutely possible to define package-specific rules for pyright, mypy, and pylint. You can enforce .filter() deprecation using: Would you like help implementing a specific one of these? 🚀 |
Exploring the possibility of adding support for mypy and static analysis tools – While I don’t yet have a concrete implementation plan, I’ll investigate how we can integrate custom mypy, pyright, or pylint rules to guide users away from deprecated methods like .filter(), suggesting alternatives such as .vfilter() or .afilter(). If feasible, this would improve both IDE and CI/CD feedback, making the migration process even smoother.
The text was updated successfully, but these errors were encountered: