mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 23:27:37 +00:00
Expose isort preferences for tools. (#4481)
* Expose isort preferences for tools. * Adhere to pylints sorted imports requirement. * More documentation, set typing in between stdlib and 3rd party.
This commit is contained in:
parent
038b1c1fc6
commit
601193b1d2
@ -6,6 +6,7 @@ from asyncio import coroutines
|
|||||||
from asyncio.futures import Future
|
from asyncio.futures import Future
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
# pylint: disable=ungrouped-imports
|
||||||
from asyncio import ensure_future
|
from asyncio import ensure_future
|
||||||
except ImportError:
|
except ImportError:
|
||||||
# Python 3.4.3 and earlier has this as async
|
# Python 3.4.3 and earlier has this as async
|
||||||
|
14
setup.cfg
14
setup.cfg
@ -10,3 +10,17 @@ exclude = .venv,.git,.tox,docs,www_static,venv,bin,lib,deps,build
|
|||||||
|
|
||||||
[pydocstyle]
|
[pydocstyle]
|
||||||
match_dir = ^((?!\.|www_static).)*$
|
match_dir = ^((?!\.|www_static).)*$
|
||||||
|
|
||||||
|
[isort]
|
||||||
|
# https://github.com/timothycrosley/isort
|
||||||
|
# https://github.com/timothycrosley/isort/wiki/isort-Settings
|
||||||
|
# splits long import on multiple lines indented by 4 spaces
|
||||||
|
multi_line_output = 4
|
||||||
|
indent = " "
|
||||||
|
# by default isort don't check module indexes
|
||||||
|
not_skip = __init__.py
|
||||||
|
# will group `import x` and `from x import` of the same module.
|
||||||
|
force_sort_within_sections = true
|
||||||
|
# typing is stdlib on py35 but 3rd party on py34, let it hang in between
|
||||||
|
known_inbetweens = typing
|
||||||
|
sections = FUTURE,STDLIB,INBETWEENS,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
|
||||||
|
Loading…
x
Reference in New Issue
Block a user