Repository navigation
refactor: remove dead code and rename misleading group method - #24
Merged
Merged
Conversation
- Delete core/utils.py (no callers) and its unused test module test_utils.py, whose entire body was commented out but still imported the deleted module - Remove unused schemas Access_Token and Message - Delete stray backup.sql - Rename GroupService.get_groups_with_cache to get_groups: it is a plain pass-through to the repository with no caching, the name lied - Drop the invalid ./.env gitignore pattern (keep /env and .venv/)
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.
Context
B8 of the portfolio fixes. Cleanup only — no behavior change: remove what nothing references and fix a name that lies. For a portfolio repo, dead code and misleading names cost reviewers time.
Changes
core/utils.pydeleted — itsfound_user_in_project_or_404had no callers (chat now goes throughProjectService), and it carried a dead bound-method statement (user = session.get) whose result was returned instead of the looked-up row.test/test_utils.pydeleted — the whole body was inside a"""..."""block (no runnable tests), yet the file-levelimport core.utilsstill executed. Removingcore/utils.pywithout this file would break pytest collection withModuleNotFoundError. It was dead code on both sides.Access_TokenandMessage(0 references;Messagewas superseded byGroupMessagePayload).backup.sqldeleted — stray file at the repo root, unreferenced.GroupService.get_groups_with_cacherenamed toget_groups— it is a plain pass-through togroup_repo.get_all_groupswith no caching; the name claimed behavior that does not exist. Updated definition, router caller and test..gitignore— dropped the invalid./envpattern (git does not interpret./;envand/envalready cover it).Verification
grepfor references:core.utils,Access_Token,schemas.Message,backup.sql,get_groups_with_cache— all report zero.git check-ignore .venv/confirms.venv/is still ignored.pytest -q-> 177 passed (unchanged; no behavior touched).