pylintdebug
Tool to debug pylint
A diagnostic tool that wraps Pylint to expose its internal decision-making and inference logic, helping developers debug why warnings fire or don't.
Pylintdebug is a tool for developers who work on or with Pylint, the popular Python code checker. It helps you figure out why Pylint is behaving in unexpected ways — for example, why it's flagging code that seems fine, or missing problems it should be catching. Instead of guessing what's going on inside Pylint, this tool gives you a window into its internal decision-making.
At a high level, the tool runs Pylint on a file you specify but inserts extra debugging hooks along the way. You can ask it to show where Pylint is generating its messages, which helps you trace why a particular warning appeared. You can also turn on a mode that prints information about "inference" — which is how Pylint's companion library, astroid, tries to understand what your Python code actually does (what type a variable is, what a function returns, and so on). It also adds a special function called reveal_inference that you can insert into code to inspect what astroid knows at a given point.
The people who'd use this are typically developers writing custom Pylint rules, debugging false positives, or contributing to Pylint and astroid themselves. For instance, if you wrote a custom Pylint plugin and your rule keeps firing when it shouldn't, you'd use this tool to trace exactly where and why the message is being triggered. It can also drop you into an interactive debugger to step through astroid's inference logic line by line.
The project is straightforward and narrowly scoped — it's not a general-purpose linter or a replacement for Pylint, just a diagnostic companion. The README doesn't go into much detail about edge cases or limitations, but the core idea is simple: it wraps Pylint, patches it on the fly, and surfaces information that's normally hidden.
Where it fits
- Trace why a specific Pylint warning is firing on code that seems correct.
- Debug a custom Pylint plugin rule that triggers when it shouldn't.
- Inspect what astroid infers about variable types and function returns at a given point in your code.
- Step through astroid's inference logic line by line in an interactive debugger.