refactor: remove dead code identified in issue #4 (~467 lines) - #9
Merged
Conversation
Remove confirmed-dead subsystems that are never instantiated or called: - AutoDocRouter class + create_auto_router() from auto_docs.py - decorators_style.py in full (get/post/put/delete/patch/Path/Body decorators that only attach metadata, never register routes) - Router.dynamic_patterns (never populated; generator.py loops method_trees and route_cache instead) - DependencyCache class + cleanup_caches() + inject() from depends.py (resolve_dependencies uses a plain dict on request.state) - HandlerProtocol from router.py (defined, never used as a type) - create_model() from validation/models.py (zero callers) Also cleaned up now-unused imports: Protocol in router.py, TypeVar in depends.py, Callable in auto_docs.py, and AutoDocRouter/decorators_style re-exports from __init__ files. All 252 tests pass. Ruff clean. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove confirmed-dead subsystems that are never instantiated or called:
Also cleaned up now-unused imports: Protocol in router.py, TypeVar in depends.py, Callable in auto_docs.py, and AutoDocRouter/decorators_style re-exports from init files.
All 252 tests pass. Ruff clean.
🤖 Generated with Codebuff