From 1112ac753899ffb03275625047a5404e57c96ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sat, 9 Mar 2019 15:04:13 +0400 Subject: [PATCH] :arrow_up: Update imports and scripts for new isort versions (#75) --- fastapi/__init__.py | 6 +++--- fastapi/security/__init__.py | 8 ++++---- scripts/lint.sh | 2 +- scripts/test.sh | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fastapi/__init__.py b/fastapi/__init__.py index e019cc3fb..10c0df830 100644 --- a/fastapi/__init__.py +++ b/fastapi/__init__.py @@ -3,7 +3,7 @@ __version__ = "0.7.1" from .applications import FastAPI -from .routing import APIRouter -from .params import Body, Path, Query, Header, Cookie, Form, File, Security, Depends -from .exceptions import HTTPException from .datastructures import UploadFile +from .exceptions import HTTPException +from .params import Body, Cookie, Depends, File, Form, Header, Path, Query, Security +from .routing import APIRouter diff --git a/fastapi/security/__init__.py b/fastapi/security/__init__.py index 5f2b38c2d..32d69e74d 100644 --- a/fastapi/security/__init__.py +++ b/fastapi/security/__init__.py @@ -1,10 +1,10 @@ -from .api_key import APIKeyQuery, APIKeyHeader, APIKeyCookie +from .api_key import APIKeyCookie, APIKeyHeader, APIKeyQuery from .http import ( + HTTPAuthorizationCredentials, HTTPBasic, + HTTPBasicCredentials, HTTPBearer, HTTPDigest, - HTTPBasicCredentials, - HTTPAuthorizationCredentials, ) -from .oauth2 import OAuth2PasswordRequestForm, OAuth2, OAuth2PasswordBearer +from .oauth2 import OAuth2, OAuth2PasswordBearer, OAuth2PasswordRequestForm from .open_id_connect_url import OpenIdConnect diff --git a/scripts/lint.sh b/scripts/lint.sh index 0d268800a..c11eaf749 100644 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -3,4 +3,4 @@ set -x autoflake --remove-all-unused-imports --recursive --remove-unused-variables --in-place docs/src/ fastapi tests --exclude=__init__.py black fastapi tests docs/src -isort --multi-line=3 --trailing-comma --force-grid-wrap=0 --combine-as --line-width 88 --recursive --apply fastapi tests docs/src +isort --multi-line=3 --trailing-comma --force-grid-wrap=0 --combine-as --line-width 88 --recursive --thirdparty fastapi --apply fastapi tests docs/src diff --git a/scripts/test.sh b/scripts/test.sh index a9b912bbe..2e5457075 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -19,4 +19,4 @@ if [ "${PYTHON_VERSION}" = '3.7' ]; then else black fastapi tests --check fi -isort --multi-line=3 --trailing-comma --force-grid-wrap=0 --combine-as --line-width 88 --recursive --check-only fastapi tests +isort --multi-line=3 --trailing-comma --force-grid-wrap=0 --combine-as --line-width 88 --recursive --check-only --thirdparty fastapi fastapi tests