Repository navigation
Remove dead code: unused functions, methods, and variables - #6547
Merged
Merged
Conversation
- `_is_distribution_log()` in distributions.py — zero callers in production code - `_get_param_values()` in visualization/_utils.py — zero callers - `_LabelEncoder.fit_transform()` in visualization/matplotlib/_contour.py — never called (fit/transform used separately) - `_log_2` in samplers/_tpe/_truncnorm.py — assigned but never referenced - Unused unpacked variables in `_calculate_griddata()` — replaced with `_` - Removed test for `_is_distribution_log()` (tested function no longer exists) Found using Skylos static analysis + LLM verification.
Contributor
Author
|
Sorry had to rerun Ruff - forgot about it. |
Contributor
Author
|
most welcome! just doing my part for an amazing library too :) |
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.
Summary
_is_distribution_log()indistributions.py— private function with zero callers in production code (only called by its own test)_get_param_values()invisualization/_utils.py— zero callers anywhere in the codebase_LabelEncoder.fit_transform()invisualization/matplotlib/_contour.py— never called (fit()andtransform()are always used separately)_log_2insamplers/_tpe/_truncnorm.py— assigned but never referencedcat_param_labels_x,cat_param_pos_x,cat_param_labels_y,cat_param_pos_y) with_in_calculate_griddata()test_is_distribution_logtest (tested function no longer exists)0 additions, 31 deletions across 5 files.
Found using Skylos static analysis with LLM verification (28 initial findings → 17 false positives removed → 11 confirmed dead → 6 selected for this PR after excluding auto-generated protobuf code and intentional patterns).
Test plan
grep -racross the full repo (including tests/) to confirm zero references