You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I've run an isort -rc -y command and after that I isort -rc --check-only and I get to see that some of the files has Imports are incorrectly sorted.
This is part of the code that is being involved:
from products.factories import (
ProductFactory,
ProductImageFactory,
ProductOptionFactory,
ProductOptionValueFactory,
ProductPresentmentPriceFactory,
ProductVariantFactory,
)
from products.models import Product, ProductImage, ProductOption, ProductOptionValue, ProductPresentmentPrice, ProductVariant
from django.test import TestCase
I have the same problem.
When I apply isort, it adds a new line between 2 third party module imports import click & import tzlocal. And when I then let isort check the file it complains about this line inside the third party category.
After I checked the -vb outputs I found out the the recognition of first and third party modules is not working correctly in my case.
I have set neither known_first_party nor known_third_party, but also when I set known_third_party with click and tzlocal the results did not change. This are my outputs:
isort --apply --recursive -vb
else-type place_module for click returned THIRDPARTY
else-type place_module for tzlocal returned FIRSTPARTY
isort --check-only --diff --recursive -vb
else-type place_module for click returned THIRDPARTY
else-type place_module for tzlocal returned THIRDPARTY
Solution for my problem:
Then I noticed that I had set skip_install = True in my tox venv handling the formatting and not set in my venv handling linting.
After I commented the line out and recreated the venv all was ok.
So I've run an
isort -rc -y
command and after that Iisort -rc --check-only
and I get to see that some of the files hasImports are incorrectly sorted.
This is part of the code that is being involved:
setup.cfg
The text was updated successfully, but these errors were encountered: