Skip to content

feat: Resolve known constructors for instance checks - #3

Open
Sau1707 wants to merge 1 commit into
mainfrom
feat/constructor-instance-rules
Open

Sau1707 wants to merge 1 commit into
mainfrom
feat/constructor-instance-rules

Conversation

@Sau1707

@Sau1707 Sau1707 commented Nov 2, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace the SLOP009 class-name allowlist with conservative resolution of locally declared and locally imported classes, without executing imports.
  • Require named instances before method calls and multiline argument-bearing constructor assignments; update documentation and regression tests.
  • Add .github/release.yml to group generated release notes by existing change-type labels and exclude intentionally skipped entries.
  • Warning behavior changes: unresolved Postgres/Kubernetes names are no longer flagged solely by name. To address new warnings, assign known instances before calling methods and split constructor assignments with arguments across lines. No runtime API migration is required.

Validation

  • uv run --extra test python -m pytest: 402 passed.
  • uvx pyunslop and uv run pyunslop: passed without warnings.
  • Ruff lint on all changed Python files: passed.
  • Release-note YAML parsing and structure assertions: passed.
  • git diff --check and staged whitespace check: passed.
  • Repository-wide uvx ruff check .: failed on three existing issues in unchanged files (two builtin-shadowing findings and one import-order finding).
  • uvx ruff format --check .: failed with 30 files requiring formatting, including existing differences and multiline constructor formatting that conflicts with SLOP009. No blanket formatting was applied.
  • No dedicated type-check configuration was found; type checking was not run.

@Sau1707 Sau1707 added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 2, 2026

This branch has not been deployed

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

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant