diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-02-23 16:59:40 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-02-23 16:59:40 +0000 |
| commit | da4d8dd69867f184347606284f1d4426facafe31 (patch) | |
| tree | 7aae782fa8cc26609e0da2ffa64a395367f7cedf | |
| parent | 81410467f4c5f1dbecc5c3d5f0f183c56da2a4dc (diff) | |
| download | sqlalchemy-da4d8dd69867f184347606284f1d4426facafe31.tar.gz | |
long lines
| -rw-r--r-- | lib/sqlalchemy/dialects/mssql/base.py | 3 | ||||
| -rw-r--r-- | lib/sqlalchemy/ext/declarative.py | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/sqlalchemy/dialects/mssql/base.py b/lib/sqlalchemy/dialects/mssql/base.py index 3f4e0b9f3..2ae083d71 100644 --- a/lib/sqlalchemy/dialects/mssql/base.py +++ b/lib/sqlalchemy/dialects/mssql/base.py @@ -816,7 +816,8 @@ class MSExecutionContext(default.DefaultExecutionContext): self.cursor.execute("SELECT scope_identity() AS lastrowid") else: self.cursor.execute("SELECT @@identity AS lastrowid") - row = self.cursor.fetchall()[0] # fetchall() ensures the cursor is consumed without closing it + # fetchall() ensures the cursor is consumed without closing it + row = self.cursor.fetchall()[0] self._lastrowid = int(row[0]) if (self.isinsert or self.isupdate or self.isdelete) and self.compiled.returning: diff --git a/lib/sqlalchemy/ext/declarative.py b/lib/sqlalchemy/ext/declarative.py index 43177e2e2..6d3941858 100644 --- a/lib/sqlalchemy/ext/declarative.py +++ b/lib/sqlalchemy/ext/declarative.py @@ -424,7 +424,9 @@ def instrument_declarative(cls, registry, metadata): """ if '_decl_class_registry' in cls.__dict__: - raise exceptions.InvalidRequestError("Class %r already has been instrumented declaratively" % cls) + raise exceptions.InvalidRequestError( + "Class %r already has been " + "instrumented declaratively" % cls) cls._decl_class_registry = registry cls.metadata = metadata _as_declarative(cls, cls.__name__, cls.__dict__) |
