utils.formatting.dedent is not working properly with tab indent. whitespace_counts contains number of spaces from the beginning of each line (see formatting.py#L35), if string doesn't contain spaces then it is equal to [0,0,0,...,0] which is always true (see formatting.py#L45), hence it will never go to tab stripping.
Steps to reproduce
>>> dedent("first string\n\n\tsecond string")
Expected behavior
>>> "first string\n\nsecond string"
Actual behavior
>>> "first string\n\n\tsecond string"
utils.formatting.dedentis not working properly withtabindent.whitespace_countscontains number of spaces from the beginning of each line (see formatting.py#L35), ifstringdoesn't contain spaces then it is equal to[0,0,0,...,0]which is always true (see formatting.py#L45), hence it will never go totabstripping.Steps to reproduce
Expected behavior
Actual behavior