systematic use of from __future__ import absolute_import
. it eliminates import NAME
confusion with very common names (eg. import ldap
is very ambiguous: can be a ldap module from realms-wiki, a ldap module from flask-ldap-login, or python-ldap
module.
also cleant up a bit the import towards PEP8: builtin modules first, then 3rd party python packages, then local packages
This commit is contained in:
parent
2919be6b87
commit
2731531768
38 changed files with 156 additions and 42 deletions
|
@ -0,0 +1,2 @@
|
|||
from __future__ import absolute_import
|
||||
|
|
@ -1,7 +1,10 @@
|
|||
from flask_sqlalchemy import DeclarativeMeta
|
||||
from __future__ import absolute_import
|
||||
|
||||
from functools import wraps
|
||||
|
||||
from flask_sqlalchemy import DeclarativeMeta
|
||||
|
||||
|
||||
|
||||
def hook_func(name, fn):
|
||||
@wraps(fn)
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
import json
|
||||
from sqlalchemy import not_, and_
|
||||
from datetime import datetime
|
||||
from realms import db
|
||||
|
||||
from sqlalchemy import not_, and_
|
||||
|
||||
from .. import db
|
||||
|
||||
|
||||
class Model(db.Model):
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import tempfile
|
||||
|
||||
from flask_testing import TestCase
|
||||
|
||||
from realms.lib.util import random_string
|
||||
from realms import create_app
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import click
|
||||
from __future__ import absolute_import
|
||||
|
||||
import re
|
||||
import os
|
||||
import hashlib
|
||||
|
@ -6,6 +7,8 @@ import json
|
|||
import string
|
||||
import random
|
||||
import sys
|
||||
|
||||
import click
|
||||
from jinja2 import Template
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue