isort
isort copied to clipboard
Adds the line before imports only if there are badly sorted imports
I am running with lines_before_imports=1 in my config file but the line before imports is added only if there are other changes to do in the file.
Example 1:
This code
"""
Some docstring
"""
from typing import Dict, List, Union
import tensorflow as tf
does not get formatted. But Example 2 does: This code
"""
Some docstring
"""
from typing import Dict, List, Union
import tensorflow as tf
yields the expected result
"""
Some docstring
"""
from typing import Dict, List, Union
import tensorflow as tf
Does anyone have an idea on how to fix that?