PY-15701 Allow to specify minimum number of blank lines after local imports

Add new option "After local imports" on "Blank lines" tab of Python
code style settings.
This commit is contained in:
Mikhail Golubev
2015-06-17 21:00:44 +03:00
parent 1a35c61156
commit f71d87d428
11 changed files with 63 additions and 15 deletions
@@ -1,6 +1,5 @@
def func():
for _ range(10):
from package.module import foo
foo
# <ref>
@@ -1,7 +1,6 @@
def func():
try:
import module
module
# <ref>
except:
@@ -1,6 +1,5 @@
def func():
if True:
import module
module
# <ref>
@@ -1,5 +1,4 @@
def func():
import module
module
# <ref>
@@ -0,0 +1,13 @@
from pprint import pprint
VAR = 42
def foo():
import sys
import ast, tokenize
pass
class C:
from textwrap import dedent
pass
import codecs as C
pass
@@ -0,0 +1,16 @@
from pprint import pprint
VAR = 42
def foo():
import sys
import ast, tokenize
pass
class C:
from textwrap import dedent
pass
import codecs as C
pass