Skip to content

Commit

Permalink
fix / cleanup imports
Browse files Browse the repository at this point in the history
  • Loading branch information
sfermigier committed Jul 9, 2018
1 parent 8d3201c commit 7129fe7
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 11 deletions.
3 changes: 1 addition & 2 deletions abilian/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import sqlalchemy.exc
import yaml
from babel.dates import LOCALTZ
from deprecated import deprecated
from flask import Blueprint, Flask, _request_ctx_stack, abort, \
appcontext_pushed, current_app, g, render_template, request, \
request_started
Expand Down Expand Up @@ -1043,7 +1042,7 @@ def create_root_user(self):

def validate_response(self, response):
# work around circular import
from abilian.testing.util import assert_valid
from abilian.testing.validation import assert_valid

assert_valid(response)
return response
Expand Down
2 changes: 1 addition & 1 deletion abilian/core/extensions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def _message_send(self, connection):
If TESTING is True the message will not actually be sent.
:param message: a Message instance.
:param self: a Message instance.
"""
sender = current_app.config["MAIL_SENDER"]
if not self.extra_headers:
Expand Down
2 changes: 1 addition & 1 deletion abilian/services/auth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import random
import string
from datetime import datetime
from typing import Any, List, Text
from typing import Any

from flask import current_app, flash, redirect, render_template, request, \
url_for
Expand Down
1 change: 0 additions & 1 deletion abilian/services/indexing/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from operator import attrgetter

import sqlalchemy as sa
from flask import current_app
from six import add_metaclass, string_types
from whoosh.fields import TEXT

Expand Down
2 changes: 1 addition & 1 deletion abilian/services/repository/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import sqlalchemy as sa
import sqlalchemy.event
from flask import _app_ctx_stack, current_app
from flask import _app_ctx_stack
from flask.globals import _lookup_app_object
from six import text_type
from sqlalchemy.orm.session import Session
Expand Down
2 changes: 1 addition & 1 deletion abilian/services/security/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from itertools import chain

import sqlalchemy as sa
from flask import current_app, g
from flask import g
from flask_login import current_user
from six import string_types, text_type
from sqlalchemy import sql
Expand Down
1 change: 0 additions & 1 deletion abilian/services/settings/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from __future__ import absolute_import, division, print_function, \
unicode_literals

from flask import current_app
from six import iteritems

from abilian.core.extensions import db
Expand Down
2 changes: 1 addition & 1 deletion abilian/services/tagging/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

from sqlalchemy import Column, DateTime, ForeignKey, Integer, Unicode

from abilian.core.entities import IdMixin
from abilian.core.extensions import db
from abilian.core.models import IdMixin


class Tag(db.Model, IdMixin):
Expand Down
2 changes: 1 addition & 1 deletion abilian/services/vocabularies/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import absolute_import, division, print_function, \
unicode_literals

from flask import current_app, g, redirect, render_template, request
from flask import g, redirect, render_template, request

from abilian.core.extensions import db
from abilian.i18n import _, _l
Expand Down
2 changes: 1 addition & 1 deletion abilian/web/admin/panels/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import pandas as pd
import six
import sqlalchemy as sa
from flask import current_app, render_template
from flask import render_template
from numpy import sum as numpysum

from abilian.core.extensions import db
Expand Down

0 comments on commit 7129fe7

Please sign in to comment.