From: Gaƫtan de Menten Date: Fri, 27 Apr 2007 09:50:00 +0000 (+0000) Subject: correct typo-equivalent mistakes in some comments/docstrings X-Git-Tag: rel_0_3_7~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=732bc9ecf08b69ca688638d40841fb128e7b5417;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git correct typo-equivalent mistakes in some comments/docstrings --- diff --git a/lib/sqlalchemy/ext/activemapper.py b/lib/sqlalchemy/ext/activemapper.py index bcfbac6329..004caf8494 100644 --- a/lib/sqlalchemy/ext/activemapper.py +++ b/lib/sqlalchemy/ext/activemapper.py @@ -271,11 +271,11 @@ class ActiveMapperMeta(type): cls.table = Table(table_name, _metadata, autoload=True, **table_opts) cls.columns = cls.table._columns - # check for inheritence if version_id_col is not None: version_id_col_object = getattr(cls.table.c, version_id_col, None) assert(version_id_col_object is not None, "version_id_col (%s) does not exist." % version_id_col) + # check for inheritence if hasattr(bases[0], "mapping"): cls._base_mapper= bases[0].mapper assign_mapper(objectstore.context, cls, cls.table, diff --git a/lib/sqlalchemy/orm/interfaces.py b/lib/sqlalchemy/orm/interfaces.py index 358e1297f2..a9a26b57f9 100644 --- a/lib/sqlalchemy/orm/interfaces.py +++ b/lib/sqlalchemy/orm/interfaces.py @@ -72,6 +72,7 @@ class MapperProperty(object): """ pass + def is_primary(self): """Return True if this ``MapperProperty``'s mapper is the primary mapper for its class. @@ -155,6 +156,7 @@ class StrategizedProperty(MapperProperty): return strategy def setup(self, querycontext, **kwargs): + self._get_context_strategy(querycontext).setup_query(querycontext, **kwargs) def execute(self, selectcontext, instance, row, identitykey, isnew): diff --git a/lib/sqlalchemy/types.py b/lib/sqlalchemy/types.py index 7d7dbeeedf..ce642c1588 100644 --- a/lib/sqlalchemy/types.py +++ b/lib/sqlalchemy/types.py @@ -164,7 +164,7 @@ def adapt_type(typeobj, colspecs): # if we adapted the given generic type to a database-specific type, # but it turns out the originally given "generic" type # is actually a subclass of our resulting type, then we were already - # were given a more specific type than that required; so use that. + # given a more specific type than that required; so use that. if (issubclass(typeobj.__class__, impltype)): return typeobj return typeobj.adapt(impltype) diff --git a/test/orm/mapper.py b/test/orm/mapper.py index 405b14cff0..08faf721f9 100644 --- a/test/orm/mapper.py +++ b/test/orm/mapper.py @@ -156,7 +156,7 @@ class MapperTest(MapperSuperTest): pass def testconstructorexceptions(self): - """test that exceptions raised raised in the mapped class are not masked by sa decorations""" + """test that exceptions raised in the mapped class are not masked by sa decorations""" ex = AssertionError('oops') sess = create_session()