# HG changeset patch # User Marcin Kuzminski # Date 2017-11-26 16:19:34 # Node ID fd7a1054c7a6d4590626050c5eaaeb66bde43611 # Parent 737f97b5ebf28aa8fb9aabcdec2fddf562e07245 db-models: fix usage of import *. - usage of import * is discourage and should be limited. diff --git a/rhodecode/model/db.py b/rhodecode/model/db.py --- a/rhodecode/model/db.py +++ b/rhodecode/model/db.py @@ -34,14 +34,17 @@ import functools import traceback import collections - -from sqlalchemy import * +from sqlalchemy import ( + or_, and_, not_, func, TypeDecorator, event, + Index, UniqueConstraint, ForeignKey, CheckConstraint, Column, + Boolean, String, Unicode, UnicodeText, DateTime, Integer, LargeBinary, + Text, Float, PickleType) +from sqlalchemy.sql.expression import true, false +from sqlalchemy.sql.functions import coalesce, count # noqa +from sqlalchemy.orm import ( + relationship, joinedload, class_mapper, validates, aliased) from sqlalchemy.ext.declarative import declared_attr from sqlalchemy.ext.hybrid import hybrid_property -from sqlalchemy.orm import ( - relationship, joinedload, class_mapper, validates, aliased) -from sqlalchemy.sql.expression import true -from sqlalchemy.sql.functions import coalesce, count # noqa from sqlalchemy.exc import IntegrityError # noqa from sqlalchemy.dialects.mysql import LONGTEXT from beaker.cache import cache_region @@ -56,7 +59,8 @@ from rhodecode.lib.utils2 import ( str2bool, safe_str, get_commit_safe, safe_unicode, md5_safe, time_to_datetime, aslist, Optional, safe_int, get_clone_url, AttributeDict, glob2re, StrictAttributeDict, cleaned_uri) -from rhodecode.lib.jsonalchemy import MutationObj, MutationList, JsonType +from rhodecode.lib.jsonalchemy import MutationObj, MutationList, JsonType, \ + JsonRaw from rhodecode.lib.ext_json import json from rhodecode.lib.caching_query import FromCache from rhodecode.lib.encrypt import AESCipher