Open akaihola opened 1 month ago
@ranelpadon I started by successfully adding a failing unit test. Next, looking deeper into the reason for the wrong behavior. It's somehow related to the fact that Darker calls isort
's API directly instead of running it as a subprocess.
I invited you as a collaborator on this repository, hoping you could be the reviewer for this PR. Would you have time for that?
Ok @ranelpadon there seem to be two reasons for isort
ignoring skip_glob =
:
isort
isort.code
instead of letting it read the file from the disk (see darker.import_sorting:137), and in this case isort
simply disregards the skip_glob =
setting (see isort.api:188)Reason 1. is easily fixed, but 2. is a trickier one. I'll need to spend a little more time on it.
Not so difficult to fix after all. @ranelpadon could you verify that this branch works for you?
This PR is best reviewed one commit at a time.
Fixes #615.