{"categories":[{"label":"Quality Assurance","url":"https://skillfed.io/packages/category/software-development-quality-assurance/3"}],"enrichment":{"capability":"Validates that `__slots__` are correctly implemented across class hierarchies, detecting overlapping slots, inheritance errors, and duplicate slot definitions by running and inspecting your code.","skillfed_tags":["performance-optimization","class-validation","cpython-specific"],"use_cases":["Validate slots inheritance in a large codebase before committing to catch mistakes early via pre-commit.","Audit a third-party library (e.g., sanic) to find slots violations in its class hierarchy.","Enforce slots usage across a team's code to ensure consistent performance optimization practices.","Detect unused or duplicate slots in classes that auto-generate slots via decorators or metaclasses.","Add to CI pipeline to prevent slots regressions as code evolves and class hierarchies change."],"what_it_does":"Slotscheck is a runtime validator for Python's `__slots__` mechanism, which developers use to optimize class memory and attribute access. The tool runs your code, inspects the resulting class tree, and detects common slots mistakes that static analyzers miss: overlapping slots across inheritance hierarchies, slots defined in child classes when parents lack them, duplicate slot names, and unused slots. It works by actually importing and executing your modules, which lets it catch slots generated at import time by decorators, metaclasses, and frameworks like dataclasses, attrs, and pydantic\u2014cases that static analysis cannot see.\n\nYou run it from the command line against files or modules, and it reports errors with class paths and problem types. It integrates into pre-commit hooks and CI pipelines to prevent slots mistakes from reaching production. The tool is CPython-specific because it relies on CPython internals to inspect the class tree; it will not work on alternative Python implementations.","worth_installing":"Yes. Slotscheck fills a real gap: static analyzers cannot catch slots mistakes that arise from runtime code generation, conditional imports, or deep inheritance trees. If you use `__slots__` for performance, this tool prevents silent failures that are hard to debug. Low install friction, active maintenance, MIT license, and no known vulnerabilities make it a safe addition to your development workflow."},"id":"slotscheck","links":{"html":"https://skillfed.io/packages/slotscheck","md":"https://skillfed.io/packages/slotscheck.md","pypi":"https://pypi.org/project/slotscheck/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-07-05","license_spdx":"MIT","license_treatment":"permissive","name":"slotscheck","python_support":"supports_current","summary":"Ensure your __slots__ are working properly."},"popularity":{"monthly_downloads":160502,"position":10659,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.20.1"}
