diff options
author | Катаев Денис <bteamko@gmail.com> | 2017-03-17 14:19:21 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-03-17 14:19:21 -0400 |
commit | 8f7cf2990f9010ea4924f2525318dff0ba1028d7 (patch) | |
tree | 3e0e4b44d8c4d5c8ae8e63b9ff5842770ec23515 /lib/sqlalchemy/testing/schema.py | |
parent | d96fc5d02a921820aa5973daf66445c880ca6cd4 (diff) | |
download | sqlalchemy-8f7cf2990f9010ea4924f2525318dff0ba1028d7.tar.gz |
New features from python 2.7
After bump minimum supported version to 2.7 (1da9d3752160430c91534a8868ceb8c5ad1451d4), we can use new syntax.
Change-Id: Ib064c75a00562e641d132f9c57e5e69744200e05
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/347
Diffstat (limited to 'lib/sqlalchemy/testing/schema.py')
-rw-r--r-- | lib/sqlalchemy/testing/schema.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/sqlalchemy/testing/schema.py b/lib/sqlalchemy/testing/schema.py index 018a291d9..f40654a2a 100644 --- a/lib/sqlalchemy/testing/schema.py +++ b/lib/sqlalchemy/testing/schema.py @@ -17,8 +17,7 @@ table_options = {} def Table(*args, **kw): """A schema.Table wrapper/hook for dialect-specific tweaks.""" - test_opts = dict([(k, kw.pop(k)) for k in list(kw) - if k.startswith('test_')]) + test_opts = {k: kw.pop(k) for k in list(kw) if k.startswith('test_')} kw.update(table_options) @@ -64,8 +63,7 @@ def Table(*args, **kw): def Column(*args, **kw): """A schema.Column wrapper/hook for dialect-specific tweaks.""" - test_opts = dict([(k, kw.pop(k)) for k in list(kw) - if k.startswith('test_')]) + test_opts = {k: kw.pop(k) for k in list(kw) if k.startswith('test_')} if not config.requirements.foreign_key_ddl.enabled_for_config(config): args = [arg for arg in args if not isinstance(arg, schema.ForeignKey)] |