diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2018-12-02 18:54:40 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2018-12-02 18:58:47 -0500 |
| commit | eacb31a89fe883edd0ada7f2724239c1f8c5b685 (patch) | |
| tree | c3ddcc147e0cad6ec5d244c2b691ce182b3ee31f /lib/sqlalchemy/ext | |
| parent | c8dea359db9bea58dc64880d306dbee2a26df247 (diff) | |
| download | sqlalchemy-eacb31a89fe883edd0ada7f2724239c1f8c5b685.tar.gz | |
"left" -> "accidentally placed at"
since "left" is kind of ambiguous, use more explicit terminology
here.
Also update the test to use a positive assertion that the
warning is emitted; quote the attribute name.
Change-Id: Ic2284c200a26b32b2da063cfaf6d59547309d587
References: https://github.com/zzzeek/sqlalchemy/pull/488
Diffstat (limited to 'lib/sqlalchemy/ext')
| -rw-r--r-- | lib/sqlalchemy/ext/declarative/base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/ext/declarative/base.py b/lib/sqlalchemy/ext/declarative/base.py index f1d75bb4b..f27314b5e 100644 --- a/lib/sqlalchemy/ext/declarative/base.py +++ b/lib/sqlalchemy/ext/declarative/base.py @@ -386,8 +386,8 @@ class _MapperConfig(object): if (isinstance(value, tuple) and len(value) == 1 and isinstance(value[0], (Column, MapperProperty))): util.warn("Ignoring declarative-like tuple value of attribute " - "%s: possibly a copy-and-paste error with a comma " - "left at the end of the line?" % k) + "'%s': possibly a copy-and-paste error with a comma " + "accidentally placed at the end of the line?" % k) continue elif not isinstance(value, (Column, MapperProperty)): # using @declared_attr for some object that |
