Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use isort v5 #999

Merged
merged 1 commit into from Jul 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements.txt
Expand Up @@ -12,7 +12,7 @@ ujson
autoflake
black
databases[sqlite]
isort
isort==5.*
mypy
pytest
pytest-cov
Expand Down
2 changes: 1 addition & 1 deletion scripts/lint
Expand Up @@ -10,5 +10,5 @@ set -x
${PREFIX}mypy starlette --ignore-missing-imports --disallow-untyped-defs
${PREFIX}autoflake --in-place --recursive starlette tests setup.py
${PREFIX}black starlette tests setup.py
${PREFIX}isort --multi-line=3 --trailing-comma --force-grid-wrap=0 --combine-as --line-width 88 --recursive --apply starlette tests setup.py
${PREFIX}isort --profile=black --combine-as starlette tests setup.py
${PREFIX}mypy starlette --ignore-missing-imports --disallow-untyped-defs
2 changes: 1 addition & 1 deletion scripts/test
Expand Up @@ -13,5 +13,5 @@ set -x
PYTHONPATH=. ${PREFIX}pytest --ignore venv --cov-config tests/.ignore_lifespan -W ignore::DeprecationWarning --cov=starlette --cov=tests --cov-fail-under=100 --cov-report=term-missing ${@}
${PREFIX}mypy starlette --ignore-missing-imports --disallow-untyped-defs
${PREFIX}autoflake --recursive starlette tests setup.py
${PREFIX}isort --multi-line=3 --trailing-comma --force-grid-wrap=0 --combine-as --line-width 88 --recursive --check starlette tests setup.py
${PREFIX}isort --profile=black --combine-as --check starlette tests setup.py
${PREFIX}black starlette tests setup.py --check
2 changes: 1 addition & 1 deletion starlette/formparsers.py
Expand Up @@ -5,8 +5,8 @@
from starlette.datastructures import FormData, Headers, UploadFile

try:
from multipart.multipart import parse_options_header
import multipart
from multipart.multipart import parse_options_header
except ImportError: # pragma: nocover
parse_options_header = None
multipart = None
Expand Down
3 changes: 1 addition & 2 deletions starlette/graphql.py
Expand Up @@ -10,9 +10,8 @@

try:
import graphene
from graphql.error import GraphQLError, format_error as format_graphql_error
from graphql.execution.executors.asyncio import AsyncioExecutor
from graphql.error import format_error as format_graphql_error
from graphql.error import GraphQLError
except ImportError: # pragma: nocover
graphene = None
AsyncioExecutor = None # type: ignore
Expand Down