From da4d8dd69867f184347606284f1d4426facafe31 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 23 Feb 2010 16:59:40 +0000 Subject: [PATCH] long lines --- lib/sqlalchemy/dialects/mssql/base.py | 3 ++- 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 3f4e0b9f34..2ae083d712 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 43177e2e23..6d39418583 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__) -- 2.47.3