Suggestion: Same import in multiple lines should be detected

In a Django file, some classes were imported as:

from . serializers import UserSerializer, LocationSerializer, StoreSerializer, OfferSerializer
from . serializers import PaymentSerializer, PaymentTypeSerializer, OrderSerializer

However, this should be:

from . serializers import UserSerializer, LocationSerializer, StoreSerializer, OfferSerializer, PaymentSerializer, PaymentTypeSerializer, OrderSerializer

This should be detected by DeepSource and can be auto fixed.

Hey @pnijhara! That’s a good suggestion. We’ll notify you here as soon as we add this check.

1 Like