summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/sql')
-rw-r--r--lib/sqlalchemy/sql/ddl.py2
-rw-r--r--lib/sqlalchemy/sql/schema.py6
-rw-r--r--lib/sqlalchemy/sql/type_api.py2
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/sqlalchemy/sql/ddl.py b/lib/sqlalchemy/sql/ddl.py
index ef6614b61..48d4bc9dc 100644
--- a/lib/sqlalchemy/sql/ddl.py
+++ b/lib/sqlalchemy/sql/ddl.py
@@ -258,7 +258,7 @@ class DDLElement(roles.DDLRole, Executable, _DDLCompiles):
def _check_ddl_on(self, on):
if on is not None and (
not isinstance(on, util.string_types + (tuple, list, set))
- and not util.callable(on)
+ and not callable(on)
):
raise exc.ArgumentError(
"Expected the name of a database dialect, a tuple "
diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py
index f0a697728..d5ee1057b 100644
--- a/lib/sqlalchemy/sql/schema.py
+++ b/lib/sqlalchemy/sql/schema.py
@@ -2222,13 +2222,13 @@ class ColumnDefault(DefaultGenerator):
raise exc.ArgumentError(
"ColumnDefault may not be a server-side default type."
)
- if util.callable(arg):
+ if callable(arg):
arg = self._maybe_wrap_callable(arg)
self.arg = arg
@util.memoized_property
def is_callable(self):
- return util.callable(self.arg)
+ return callable(self.arg)
@util.memoized_property
def is_clause_element(self):
@@ -4211,7 +4211,7 @@ class MetaData(SchemaItem):
for name, schname in zip(available, available_w_schema)
if extend_existing or schname not in current
]
- elif util.callable(only):
+ elif callable(only):
load = [
name
for name, schname in zip(available, available_w_schema)
diff --git a/lib/sqlalchemy/sql/type_api.py b/lib/sqlalchemy/sql/type_api.py
index 11407ad2e..9c5f5dd47 100644
--- a/lib/sqlalchemy/sql/type_api.py
+++ b/lib/sqlalchemy/sql/type_api.py
@@ -1461,7 +1461,7 @@ def to_instance(typeobj, *arg, **kw):
if typeobj is None:
return NULLTYPE
- if util.callable(typeobj):
+ if callable(typeobj):
return typeobj(*arg, **kw)
else:
return typeobj