can you go through the codebase and find/remove any shims? Update tests if need be
- User
can you go through the codebase and find/remove any shims? Update tests if need be
- Assistant
I’ll scan the repo for any shim usage or shim files, then remove them carefully and run/update tests for regressions. I’m starting with a broad text/file search (
shim, polyfill-like adapters, compatibility wrappers) to map what needs changing. - Assistant
I found several likely shim patterns: explicit “compatibility wrapper/facade” modules and backward-compat aliases (mainly in
desloppify/review,desloppify/lang/python/detectors/smells_ast,desloppify/narrative, anddesloppify/scoring). Next I’ll inspect each candidate and remove only the wrappers that are now unused, then run tests and patch failures. - Assistant
I’ve confirmed concrete shim candidates rather than general “legacy support” logic: wrapper functions in
review/context.py, a facade modulereview/dimensions.py, and compatibility facades in Python smell detectors. I’m now checking where each is imported so we can remove them without accidental breakage. - Assistant
I’ve identified a second shim cluster:
desloppify.review.dimensionsis a pure facade that internal modules still import. I’m going to replace those imports with direct submodule imports and then delete the facade module if tests pass. - Assistant
Quick note before edits: the repo already has a very large set of in-progress changes, including the shim-related files. I’ll only touch the shim candidates needed for this request and avoid reverting unrelated work.
- Assistant
Plan for this pass:
- Remove shim wrappers in
desloppify/review/context.pyand route callers to direct signal functions. - Remove the
desloppify/review/dimensions.pycompatibility facade by switching imports todimensions_file,dimensions_holistic, anddimensions_lang. - Remove Python AST shim surfaces: drop
smells_astdeprecated__getattr__exports and remove_tree_detectors.pyfacade by importing concrete detector modules directly. - Remove the
ASSESSMENT_CHECKSscoring alias shim and update tests to useSUBJECTIVE_CHECKS. - Update failing tests and run a focused pytest subset on all touched areas, then expand if clean.
- Remove shim wrappers in
- Assistant
I’m starting edits in
review/context.pyto remove the wrapper shims and call signal functions directly, then I’ll propagate those import changes into dependent modules/tests. - Assistant
I’m now removing the
review.dimensionsfacade wiring from package imports and dropping the old_gather_*/_classify_*compatibility exports fromreview.__init__. - Assistant
Next I’m removing the Python AST detector facade shim by changing
_dispatch.pyto import tree detectors from their concrete modules directly, then deleting the facade file. - Assistant
I removed the deprecated export shim in
smells_ast/__init__.py; I’m updating the direct API test to assert those legacy names are no longer surfaced. - Assistant
I’ve finished the main shim-removal edits in
review/*,smells_ast/*, and scoring constants. I’m running focused tests now to catch import/API fallout and then I’ll patch any failures. - Assistant
I hit one suite-level failure:
tests/test_direct_coverage_modules.pystill importsdesloppify.review.dimensions. I’m updating that test to target the new split modules and rerunning the suite. - Assistant
One remaining true shim marker is
desloppify/narrative/__init__.pyre-exporting many private internals “for backward compatibility.” I’m removing those compatibility re-exports and updating tests to import those helpers from their owning submodules. - Assistant
I removed the remaining narrative compatibility re-exports as well and updated tests to import helpers from their real modules. I’m running the full suite one more time to confirm everything is stable.
- Assistant
Removed the shim layers I found and updated tests accordingly.
What changed:
- Removed review compatibility facade module: deleted
/Users/user_c042661f/Documents/desloppify/desloppify/review/dimensions.py. - Rewired review imports to concrete modules in
/Users/user_c042661f/Documents/desloppify/desloppify/review/__init__.py, , and .
- Removed review compatibility facade module: deleted