Skip to content

v1.3.1

Choose a tag to compare

@github-actions github-actions released this 06 Nov 03:13
· 5 commits to main since this release
Immutable release. Only release title and notes can be modified.
733bcbf

Highlights

  • Every suggested dead-code fix is now verified to leave valid Python before it is offered, in the CLI, JSON output, and VS Code quick fixes.
  • Jupyter notebooks get cell-accurate findings and quick fixes that edit the right cell.
  • The VS Code extension supports monorepos: each nested project is scanned with its own configuration.
  • Editor settings now override project configuration in both directions, backed by new --no-* CLI flags.
  • Fewer false positives in dead-code detection, from better handling of annotations, registries, external base classes, and module-attribute calls.
  • The HTML report gains light and dark themes, richer issue cards, and a Slop Index page from deslop --html.

Verified Fixes

  • Raw fix ranges are replaced by fixes planned with the --fix engine. Deleting a definition's span alone can break Python (import , sys, = 1, an empty suite); each suggestion now parses after it is applied.
  • --fix works on notebooks: it plans edits against the joined code cells and reports them relative to their cell.

Notebook Support

  • With --include-ipynb --ipynb-cells, finding lines and fix byte offsets are relative to the finding's cell (cell_number, counting markdown cells as nbformat does).
  • Notebook fixes are planned against the joined code cells and then expressed per cell, so editors can apply them to the cell directly.
  • Stable IDs of cell findings include the cell. IDs of findings outside notebooks are unchanged, so existing baselines stay valid.

Project Configuration And Editors

  • New cytoscnpy projects lists the projects under a folder: the folder itself and each folder below it with its own .cytoscnpy.toml or [tool.cytoscnpy] table.
  • New --no-secrets, --no-danger, --no-quality, --no-clones, --no-include-tests, and --no-include-ipynb turn off what project configuration turns on; of a flag and its --no- form, the last one wins.
  • New --force-exclude applies folder exclusions to files passed directly by path, as editors and pre-commit hooks pass them.
  • VS Code: unset settings defer to project configuration, and a setting explicitly set to false disables the scan even when project configuration enables it.

Dead-Code Accuracy

  • String annotations (forward references) are parsed, along with string arguments to cast, TypeVar, NewType, and functional TypedDict/NamedTuple; names used only there count as used.
  • Literal[...] values and Annotated[...] metadata are kept out of annotation context, and PEP 695 type parameter bounds and defaults are visited.
  • Functions held in registries, callbacks, and returned nested functions stay reachable, as do decorators, default arguments, and metaclasses that run at definition time.
  • Methods of classes extending an external base, including private hooks the base calls, are no longer reported.
  • Calls through module attributes (a.helper() after from . import a) and dotted imports such as import os.path resolve correctly.
  • Property setters and @overload stubs no longer drop the edges of the definitions they share a name with.
  • import x as x is treated as an explicit re-export (PEP 484).

HTML Report

  • --html-theme <auto|dark|light> sets the theme the report opens with; viewers can switch with a toggle, and printing uses a light layout.
  • Each issue shows its rule ID, real severity, and the # noqa: <rule-id> comment that suppresses it, with a copy button. Notebook issues link to their cell and line.
  • cytoscnpy deslop --html adds a Slop Index page to the same report.

Security And Dependencies

  • Updated tokio to 1.54.1 (RUSTSEC-2026-0386) and futures to 0.3.34, which drops the unmaintained pin-utils (RUSTSEC-2026-0441).
  • Updated development dependencies certifi, filelock, msgpack, and pylint to patched versions.

Upgrading

See the migration guide for v1.3.1 notes. Update the pre-commit hook rev to v1.3.1.

What's Changed

  • fix: autofix audit, verified fixes, notebook support (v1.3.1) by @djinn-soul in #141
  • docs(vscode): document monorepo, notebook fixes and setting overrides by @djinn-soul in #142

Full Changelog: v1.3.0...v1.3.1