Repository navigation
v3.0.1
[3.0.1] - 2026-01-08
New year new me, and a new release! Happy new year everyone!
Added
-
Added
--traceflag for runtime call tracing usingsys.settrace()to capture dynamic dispatch patterns (visitor patterns, getattr, plugins) -
Added
skylos/tracer.pywithCallTracerclass to record function calls during test execution -
Added pytest plugin hooks (
pytest_configure,pytest_unconfigure,pytest_addoption) for--skylos-traceintegration -
Added
.skylos_tracefile generation containing JSON trace data with function calls, line numbers, and call counts -
Added trace data x-referencing in analyzer to eliminate false positives for dynamic codes
-
Added progress callback support to
analyze()for real-time file processing feedback -
Added progress indicator in CLI showing
[current/total] filenameduring analysis -
Added dead code reporting for truly empty Python files (empty or docstring-only), tagged as SKY-U002 under unused_files
-
Added
unused_files_countto analysis_summary when empty-file findings are present -
Added unit test coverage for empty-file reporting
-
Added AST body masking feature via
skylos/ast_mask.pyto support masking by name, decorator, and base-class globs -
Added
skylos/known_patterns.pywith framework pattern detection -
Added class context-aware framework entrypoint detection (e.g.,
save()only skipped if insideModelsubclass) -
Added config-based dead code suppression
- Config file support in
pyproject.toml:[tool.skylos.whitelist].names- Glob patterns (e.g.,"handle_*")[tool.skylos.whitelist.documented]- Patterns with reasons for team visibility[tool.skylos.whitelist.temporary]- Patterns with expiration dates to prevent whitelist rot[tool.skylos.overrides."path/*"]- Per-file/folder whitelist rules
- Config file support in
-
Added new CLI commands. 1.
skylos whitelist <pattern>2.skylos whitelist <pattern> --reason "why"3.skylos whitelist --show -
Added new helper functions in
config.py:is_whitelisted(),get_all_ignore_lines(),get_expired_whitelists() -
Added "Conf" column showing confidence percentage for each flagged item. 100% = definitely dead, 60-80% = probably dead but check, <60% = not flagged
-
Expanded SOFT_PATTERNS in
known_patterns.py:visit_*,leave_*(25) - AST visitor pattern dispatchpytest_*(30) - pytest hook functions*Plugin(20) - plugin discovery via__subclasses__()
-
Added the following for reducing false positives:
- ABC class tracking. Detects classes inheriting from
ABC - Abstract method tracking. Records methods with
@abstractmethoddecorator - ABC implementer detection. Tracks classes inheriting from ABC classes
- Protocol implementer detection. Tracks classes that are explicitly inheriting from Protocol classes
- Protocol method name tracking
- Duck-typed Protocol detection (≥70% method overlap with ≥3 methods)
- ABC class tracking. Detects classes inheriting from
Changed
- Replaced
--coverageflag with--tracefor runtime analysis - Updated
implicit_refs.pyto store traced function lines as lists - Updated
should_mark_as_used()to iterate over traced line lists with ~5 lines tolerance matching - Added automatic suppression for pytest hook functions (
pytest_configure,pytest_unconfigure,pytest_addoption, etc.) - Added automatic suppression for abstract base class (abc) methods
Skylos.analyze()acceptsprogress_callbackparameter for progress reporting- Updated the analyzer result schema to include
unused_files: []in the top-level output - Updated
_apply_penalties()in analyzer to use new known patterns system. 1. Hard entrypoints whereconfidence = 0. 2. Framework entrypointsconfidence = 0only with class context + framework evidence 3. Soft patterns that reduce confidence proportionally - Updated
visit_FunctionDefinframework_aware.pyto immediately add decorated lines toframework_decorated_lines(fixes Pydantic model detection in routes) - Framework decorator patterns now set
is_route = Trueduring visiting (not just infinalize()) - Reduced
dynamic_modulepenalty from 40 to 10 - Updated
skylos initto properly reset ALL[tool.skylos*]sections (fixed regex) - Mixin method confidence penalty increased from -50 to -60
- Protocol class definitions now get confidence = 0
- Abstract method implementations now get confidence = 0 when parent ABC is tracked
- Duck-typed Protocol implementations now get confidence = 0
- Shifted
apply_penaltiesfunction fromanalyzer.pyinto a separate script
Fixed
- Fixed import path in cli.py:
from skylos.skylos_trace→from skylos.tracer - Fixed false positives for dynamically dispatched methods (visitor patterns, plugin hooks)
- Fixed analyzer output JSON serialization edge case in tests by ensuring mocked definitions provide concrete line / filename fields (prevents TypeError: Object of type Mock is not JSON serializable)
- Fixed
proc_file()tests to match the updated return signature - Fixed Flask route detection bug where
app = Flask(__name__)routes were incorrectly marked as unused- Root cause:
if is_passed or not is_createdevaluated toFalsewhenis_created=Trueandis_passed=False - Fix: Removed conditional, all routes are now unconditionally added to
framework_decorated_lines
- Root cause:
- Fixed
@login_requiredand other framework decorators not adding functions toframework_decorated_lines - Fixed Pydantic models used as route type hints not being marked as used
- Fixed
ComplexityRulenot counting complexity (visitor was returning early on FunctionDef) - Fixed Python 3.13 compatibility issue in
ComplexityRulewith nested classsuper()scope - Fixed test mock path:
skylos.framework_aware.Path→skylos.visitors.framework_aware.Path - Fixed
skylos initnot removing duplicate config sections when run multiple times - Fixed
skylos whitelistcommand writing to wrong section
Removed
- Removed
--coverageflag (replaced by--trace)