Remove dead code: unused functions, constants, and color definitions#1836
Closed
duriantaco wants to merge 1 commit intohttpie:masterfrom
Closed
Remove dead code: unused functions, constants, and color definitions#1836duriantaco wants to merge 1 commit intohttpie:masterfrom
duriantaco wants to merge 1 commit intohttpie:masterfrom
Conversation
- `to_help_message()` in rich_help.py — never called; remove along with constants and helpers that only existed to support it (unpack_argument, MORE_INFO_COMMANDS, LEFT_PADDING_*, LEFT_INDENT_*, STYLE_METAVAR, STYLE_SWITCH, MAX_CHOICE_CHARS) - `enable_highlighter()` in rich_utils.py — context manager never used - `humanize_bytes()` in utils.py — function never called - `SEPARATOR_GROUP_DATA_EMBED_ITEMS` in cli/constants.py — frozenset never referenced in any import or code path - `DEFAULT_SESSIONS_DIR` in sessions.py — path constant never read - 7 unused Solarized color class attributes in colors.py (BASE02, BASE00, BASE0, BASE2, BASE3, MAGENTA, VIOLET) — defined but not used in the styles dict or anywhere else Dead code was identified using Skylos (https://github.com/duriantaco/skylos).
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.
Hello, doing some cleanup here.
Here are some of the stuff we think should be cleaned up..
to_help_message()in rich_help.py... Never called. Removed along with constants and helpers that only existed to support it (unpack_argument, MORE_INFO_COMMANDS, LEFT_PADDING_, LEFT_INDENT_, STYLE_METAVAR, STYLE_SWITCH, MAX_CHOICE_CHARS)enable_highlighter()in rich_utils.py. Never usedhumanize_bytes()in utils.py. Not calledSEPARATOR_GROUP_DATA_EMBED_ITEMSin cli/constants.py.. frozenset never referenced in any importDEFAULT_SESSIONS_DIRin sessions.py... Path constant never readDead code was identified using Skylos (https://github.com/duriantaco/skylos).