diff options
author | Federico Caselli <cfederico87@gmail.com> | 2022-11-03 20:52:21 +0100 |
---|---|---|
committer | Federico Caselli <cfederico87@gmail.com> | 2022-11-16 23:03:04 +0100 |
commit | 4eb4ceca36c7ce931ea65ac06d6ed08bf459fc66 (patch) | |
tree | 4970cff3f78489a4a0066cd27fd4bae682402957 /lib/sqlalchemy/sql/crud.py | |
parent | 3fc6c40ea77c971d3067dab0fdf57a5b5313b69b (diff) | |
download | sqlalchemy-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/crud.py')
-rw-r--r-- | lib/sqlalchemy/sql/crud.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/sqlalchemy/sql/crud.py b/lib/sqlalchemy/sql/crud.py index 31d127c2c..017ff7baa 100644 --- a/lib/sqlalchemy/sql/crud.py +++ b/lib/sqlalchemy/sql/crud.py @@ -227,15 +227,15 @@ def _get_crud_params( parameters = {} elif stmt_parameter_tuples: assert spd is not None - parameters = dict( - (_column_as_key(key), REQUIRED) + parameters = { + _column_as_key(key): REQUIRED for key in compiler.column_keys if key not in spd - ) + } else: - parameters = dict( - (_column_as_key(key), REQUIRED) for key in compiler.column_keys - ) + parameters = { + _column_as_key(key): REQUIRED for key in compiler.column_keys + } # create a list of column assignment clauses as tuples values: List[_CrudParamElement] = [] @@ -1278,10 +1278,10 @@ def _get_update_multitable_params( values, kw, ): - normalized_params = dict( - (coercions.expect(roles.DMLColumnRole, c), param) + normalized_params = { + coercions.expect(roles.DMLColumnRole, c): param for c, param in stmt_parameter_tuples - ) + } include_table = compile_state.include_table_with_column_exprs |