summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/functions.py
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2022-11-03 20:52:21 +0100
committerFederico Caselli <cfederico87@gmail.com>2022-11-16 23:03:04 +0100
commit4eb4ceca36c7ce931ea65ac06d6ed08bf459fc66 (patch)
tree4970cff3f78489a4a0066cd27fd4bae682402957 /lib/sqlalchemy/sql/functions.py
parent3fc6c40ea77c971d3067dab0fdf57a5b5313b69b (diff)
downloadsqlalchemy-4eb4ceca36c7ce931ea65ac06d6ed08bf459fc66.tar.gz
Try running pyupgrade on the code
command run is "pyupgrade --py37-plus --keep-runtime-typing --keep-percent-format <files...>" pyupgrade will change assert_ to assertTrue. That was reverted since assertTrue does not exists in sqlalchemy fixtures Change-Id: Ie1ed2675c7b11d893d78e028aad0d1576baebb55
Diffstat (limited to 'lib/sqlalchemy/sql/functions.py')
-rw-r--r--lib/sqlalchemy/sql/functions.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/sqlalchemy/sql/functions.py b/lib/sqlalchemy/sql/functions.py
index fad7c28eb..5ed89bc82 100644
--- a/lib/sqlalchemy/sql/functions.py
+++ b/lib/sqlalchemy/sql/functions.py
@@ -167,9 +167,7 @@ class FunctionElement(Executable, ColumnElement[_T], FromClause, Generative):
@property
def _proxy_key(self):
- return super(FunctionElement, self)._proxy_key or getattr(
- self, "name", None
- )
+ return super()._proxy_key or getattr(self, "name", None)
def _execute_on_connection(
self,
@@ -660,7 +658,7 @@ class FunctionElement(Executable, ColumnElement[_T], FromClause, Generative):
):
return Grouping(self)
else:
- return super(FunctionElement, self).self_group(against=against)
+ return super().self_group(against=against)
@property
def entity_namespace(self):
@@ -1198,7 +1196,7 @@ class ReturnTypeFromArgs(GenericFunction[_T]):
]
kwargs.setdefault("type_", _type_from_args(fn_args))
kwargs["_parsed_args"] = fn_args
- super(ReturnTypeFromArgs, self).__init__(*fn_args, **kwargs)
+ super().__init__(*fn_args, **kwargs)
class coalesce(ReturnTypeFromArgs[_T]):
@@ -1304,7 +1302,7 @@ class count(GenericFunction[int]):
def __init__(self, expression=None, **kwargs):
if expression is None:
expression = literal_column("*")
- super(count, self).__init__(expression, **kwargs)
+ super().__init__(expression, **kwargs)
class current_date(AnsiFunction[datetime.date]):
@@ -1411,7 +1409,7 @@ class array_agg(GenericFunction[_T]):
type_from_args, dimensions=1
)
kwargs["_parsed_args"] = fn_args
- super(array_agg, self).__init__(*fn_args, **kwargs)
+ super().__init__(*fn_args, **kwargs)
class OrderedSetAgg(GenericFunction[_T]):