Ustay-coder/debugpy
· public repoD
49.6/100
Every source file on the default branch · graded Dec 4, 2026, again every week
Fix these first
Dsrc/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey.py33.5
Dsrc/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/process.py36.9
Dsrc/debugpy/_vendored/pydevd/pydevd.py37.1
Dsrc/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/kernel32.py37.5
Dsrc/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/interactive.py37.6
Paste into your AI agent
Improve the code quality of the files below without changing their behaviour. For each point, the rubric level the file is at now is followed by the level to reach. src/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey.py (D 33.5) - Error handling (2.0/5). Now: The main path is handled, but some `except` clauses are too broad. Aim for: Every failure this file can produce is explicit, typed and recoverable. A file with no failure modes also belongs here. - Testability (2.1/5). Now: Only some dependencies can be passed in. Aim for: Dependencies are passed in and pure logic is separate from I/O. Functions and classes that receive collaborators as arguments also belong here. - Readability (2.2/5). Now: Generally readable, but one or two functions are long or dense. Aim for: Short functions, early returns and flat control flow; behaviour is predictable from the signatures. Evidence: line 119: Function '_separate_future_imports' has 69 lines (max 60); line 119: Refactor '_separate_future_imports' to reduce its Cognitive Complexity from 23 to the 15 allowed; line 265: Refactor '_get_str_type_compatible' to reduce its Cognitive Complexity from 20 to the 15 allowed; line 310: Refactor 'remove_quotes_from_args' to reduce its Cognitive Complexity from 30 to the 15 allowed. - Dead code (2.3/5). Now: Small repetitions that would be worth extracting. Aim for: Nothing unused, and repetition is extracted where that helps. Evidence: line 19: `_pydevd_bundle.pydevd_constants.IS_PY313_OR_GREATER` imported but unused. - Types (2.4/5). Now: Mostly typed, with a few `Any`, `cast()` or unexplained `# type: ignore`. Aim for: Type hints describe the public API, and `cast()` or `# type: ignore[code]` appear only at validated boundaries. - File length: 874 non-blank lines; split it to 400 or fewer.
Fix prompts for the other 4 files appear after you install.
Grade every pull request in your own reposPrivate repos too, and a README badge that stays current. Free for 20 pull requests a month.
Already installed? Sign in