Browse Source

⬆️ Update imports and scripts for new isort versions (#75)

pull/76/head
Sebastián Ramírez 6 years ago
committed by GitHub
parent
commit
1112ac7538
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      fastapi/__init__.py
  2. 8
      fastapi/security/__init__.py
  3. 2
      scripts/lint.sh
  4. 2
      scripts/test.sh

6
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

8
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

2
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

2
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

Loading…
Cancel
Save