Skip to content

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

Open
@BLucky-gh

Description

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

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions