forked from orbit-oss/flask
apply reorder-python-imports pre-commit config
This commit is contained in:
parent
ab8d60d826
commit
43483683b2
56 changed files with 292 additions and 247 deletions
|
|
@ -6,7 +6,6 @@
|
|||
:copyright: © 2010 by the Pallets team.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
import gc
|
||||
import os
|
||||
import pkgutil
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
:copyright: © 2010 by the Pallets team.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
import flask
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from flask import Blueprint, render_template
|
||||
from flask import Blueprint
|
||||
from flask import render_template
|
||||
|
||||
admin = Blueprint(
|
||||
"admin",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from flask import Blueprint, render_template
|
||||
from flask import Blueprint
|
||||
from flask import render_template
|
||||
|
||||
frontend = Blueprint("frontend", __name__, template_folder="templates")
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from __future__ import absolute_import, print_function
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
|
||||
from flask import Flask
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from __future__ import absolute_import, print_function
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
|
||||
from flask import Flask
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from __future__ import absolute_import, print_function
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
|
||||
from flask import Flask
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from __future__ import absolute_import, print_function
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
|
||||
from flask import Flask
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
:copyright: © 2010 by the Pallets team.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
|
|
@ -18,7 +17,9 @@ from threading import Thread
|
|||
|
||||
import pytest
|
||||
import werkzeug.serving
|
||||
from werkzeug.exceptions import BadRequest, Forbidden, NotFound
|
||||
from werkzeug.exceptions import BadRequest
|
||||
from werkzeug.exceptions import Forbidden
|
||||
from werkzeug.exceptions import NotFound
|
||||
from werkzeug.http import parse_date
|
||||
from werkzeug.routing import BuildError
|
||||
|
||||
|
|
|
|||
|
|
@ -8,15 +8,14 @@
|
|||
:copyright: © 2010 by the Pallets team.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
import functools
|
||||
|
||||
import pytest
|
||||
from jinja2 import TemplateNotFound
|
||||
from werkzeug.http import parse_cache_control_header
|
||||
|
||||
import flask
|
||||
|
||||
from flask._compat import text_type
|
||||
from werkzeug.http import parse_cache_control_header
|
||||
from jinja2 import TemplateNotFound
|
||||
|
||||
|
||||
def test_blueprint_specific_error_handling(app, client):
|
||||
|
|
|
|||
|
|
@ -6,10 +6,8 @@
|
|||
:copyright: © 2010 by the Pallets team.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
# This file was part of Flask-CLI and was modified under the terms of
|
||||
# its Revised BSD License. Copyright © 2015 CERN.
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import os
|
||||
|
|
@ -23,21 +21,21 @@ import pytest
|
|||
from _pytest.monkeypatch import notset
|
||||
from click.testing import CliRunner
|
||||
|
||||
from flask import Flask, current_app, Blueprint
|
||||
from flask.cli import (
|
||||
AppGroup,
|
||||
FlaskGroup,
|
||||
NoAppException,
|
||||
ScriptInfo,
|
||||
dotenv,
|
||||
find_best_app,
|
||||
get_version,
|
||||
load_dotenv,
|
||||
locate_app,
|
||||
prepare_import,
|
||||
run_command,
|
||||
with_appcontext,
|
||||
)
|
||||
from flask import Blueprint
|
||||
from flask import current_app
|
||||
from flask import Flask
|
||||
from flask.cli import AppGroup
|
||||
from flask.cli import dotenv
|
||||
from flask.cli import find_best_app
|
||||
from flask.cli import FlaskGroup
|
||||
from flask.cli import get_version
|
||||
from flask.cli import load_dotenv
|
||||
from flask.cli import locate_app
|
||||
from flask.cli import NoAppException
|
||||
from flask.cli import prepare_import
|
||||
from flask.cli import run_command
|
||||
from flask.cli import ScriptInfo
|
||||
from flask.cli import with_appcontext
|
||||
|
||||
cwd = os.getcwd()
|
||||
test_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "test_apps"))
|
||||
|
|
|
|||
|
|
@ -6,14 +6,14 @@
|
|||
:copyright: © 2010 by the Pallets team.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
from datetime import timedelta
|
||||
import os
|
||||
import textwrap
|
||||
from datetime import timedelta
|
||||
|
||||
import pytest
|
||||
|
||||
import flask
|
||||
from flask._compat import PY2
|
||||
import pytest
|
||||
|
||||
|
||||
# config keys used for the TestConfig
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
:copyright: © 2010 by the Pallets team.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
import datetime
|
||||
import io
|
||||
import os
|
||||
|
|
@ -16,13 +15,18 @@ import uuid
|
|||
|
||||
import pytest
|
||||
from werkzeug.datastructures import Range
|
||||
from werkzeug.exceptions import BadRequest, NotFound
|
||||
from werkzeug.http import http_date, parse_cache_control_header, parse_options_header
|
||||
from werkzeug.exceptions import BadRequest
|
||||
from werkzeug.exceptions import NotFound
|
||||
from werkzeug.http import http_date
|
||||
from werkzeug.http import parse_cache_control_header
|
||||
from werkzeug.http import parse_options_header
|
||||
|
||||
import flask
|
||||
from flask import json
|
||||
from flask._compat import StringIO, text_type
|
||||
from flask.helpers import get_debug_flag, get_env
|
||||
from flask._compat import StringIO
|
||||
from flask._compat import text_type
|
||||
from flask.helpers import get_debug_flag
|
||||
from flask.helpers import get_env
|
||||
|
||||
|
||||
def has_encoding(name):
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@
|
|||
:copyright: © 2010 by the Pallets team.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
|
||||
import flask
|
||||
from flask._compat import PY2
|
||||
|
||||
|
|
|
|||
|
|
@ -6,14 +6,14 @@ tests.test_json_tag
|
|||
:copyright: © 2010 by the Pallets team.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
from datetime import datetime
|
||||
from uuid import uuid4
|
||||
|
||||
import pytest
|
||||
|
||||
from flask import Markup
|
||||
from flask.json.tag import TaggedJSONSerializer, JSONTag
|
||||
from flask.json.tag import JSONTag
|
||||
from flask.json.tag import TaggedJSONSerializer
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
|
|
|||
|
|
@ -6,14 +6,15 @@ tests.test_logging
|
|||
:copyright: © 2010 by the Pallets team.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
import logging
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
|
||||
from flask._compat import StringIO
|
||||
from flask.logging import default_handler, has_level_handler, wsgi_errors_stream
|
||||
from flask.logging import default_handler
|
||||
from flask.logging import has_level_handler
|
||||
from flask.logging import wsgi_errors_stream
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
:copyright: © 2010 by the Pallets team.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
import gc
|
||||
import sys
|
||||
import threading
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
:copyright: © 2010 by the Pallets team.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
import flask
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
:copyright: © 2010 by the Pallets team.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -9,9 +9,7 @@
|
|||
:copyright: © 2010 by the Pallets team.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
import flask
|
||||
|
||||
from flask._compat import StringIO
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@
|
|||
:copyright: © 2010 by the Pallets team.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
import logging
|
||||
|
||||
import pytest
|
||||
import werkzeug.serving
|
||||
from jinja2 import TemplateNotFound
|
||||
|
||||
import flask
|
||||
import logging
|
||||
from jinja2 import TemplateNotFound
|
||||
import werkzeug.serving
|
||||
|
||||
|
||||
def test_context_processing(app, client):
|
||||
|
|
|
|||
|
|
@ -10,15 +10,16 @@
|
|||
"""
|
||||
import click
|
||||
import pytest
|
||||
|
||||
import flask
|
||||
import werkzeug
|
||||
|
||||
import flask
|
||||
from flask import appcontext_popped
|
||||
from flask._compat import text_type
|
||||
from flask.cli import ScriptInfo
|
||||
from flask.json import jsonify
|
||||
from flask.testing import make_test_environ_builder, FlaskCliRunner, EnvironBuilder
|
||||
from flask.testing import EnvironBuilder
|
||||
from flask.testing import FlaskCliRunner
|
||||
from flask.testing import make_test_environ_builder
|
||||
|
||||
try:
|
||||
import blinker
|
||||
|
|
|
|||
|
|
@ -6,8 +6,11 @@ tests.test_user_error_handler
|
|||
:copyright: © 2010 by the Pallets team.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
from werkzeug.exceptions import Forbidden
|
||||
from werkzeug.exceptions import HTTPException
|
||||
from werkzeug.exceptions import InternalServerError
|
||||
from werkzeug.exceptions import NotFound
|
||||
|
||||
from werkzeug.exceptions import Forbidden, InternalServerError, HTTPException, NotFound
|
||||
import flask
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,11 +8,9 @@
|
|||
:copyright: © 2010 by the Pallets team.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
from werkzeug.http import parse_set_header
|
||||
|
||||
import flask
|
||||
import flask.views
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue