OK but if you have large amounts of unused code throughout the codebase, mistakes are more likely to be "missed, blindly trusted, or just misunderstood".
Delete it? Version control is your backup
return X unless [complex logic]
I sometimes see this stacked inside other complex logic and it’s a nightmare sometimes to figure out the actual control flow.