isort icon indicating copy to clipboard operation
isort copied to clipboard

Add an option to add newline between import groups as per `flake8-import-order`'s hints

Open BLucky-gh opened this issue 3 years ago • 0 comments

Basically my suggestion is to turn this:

from getpass import getpass
import json
import os
from os import path

import requests
from requests.structures import CaseInsensitiveDict
import rsa
import websockets

into

import json
from getpass import getpass
from os import path

import requests
from requests.structures import CaseInsensitiveDict

import rsa

import websockets

(the double newline separates bultins from 3rd party modules)

flake8-import-order also gives a hint to do this on the google preset, while isort's google preset doesn't separate the groups, so either one of the two utilities is going against the style guideline or it's undefined by google

EDIT: didn't notice the code block formatting was wrong, also the code example for output was a bit wrong too

BLucky-gh avatar Oct 21 '21 13:10 BLucky-gh