Fix indent=tab normalization for quoted and capitalized .isort.cfg values - #2704
pradip-pawar1 wants to merge 5 commits into
Conversation
|
Thanks for picking this up! A few things I noticed while testing this against
(Testing done with help from Claude; results verified locally.) |
|
Thank you for digging into this and testing against clean main — you're right, I can't reproduce the normalization gap either now that I've rechecked. My original reproduction must have been run against a contaminated environment; I missed that You're also right about the Given #2708 already has a real fix with tests for the actual |
Fixes #2693
.isort.cfgvalues likeindent="tab"(quoted) orindent=Tab(capitalized) were silently falling back to spaces instead of producing a real tab, because the auto-discovery config path (viafind_all_configs/Trie) never ran the existing quote-stripping/tab- normalization logic — that logic only applied when an explicit --settings-path was given.This moves the normalization into
_get_config_data()itself, the function both paths share, so auto-discovered and explicitly-pathed configs behave consistently.Known remaining limitation: a literal tab byte or escaped
\t/\\tin the config value are not normalized —configparserstrips whitespace-only values before this code runs, and escape sequences aren't something this fix attempts to interpret. Users should write the wordtaborTab.