From cca03097f47f22783d42d1853faac6cf84607c5a Mon Sep 17 00:00:00 2001 From: Brian Jarrett Date: Sun, 20 Jul 2014 12:44:40 -0400 Subject: - apply pep8 formatting to sqlalchemy/sql, sqlalchemy/util, sqlalchemy/dialects, sqlalchemy/orm, sqlalchemy/event, sqlalchemy/testing --- lib/sqlalchemy/dialects/postgresql/constraints.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'lib/sqlalchemy/dialects/postgresql/constraints.py') diff --git a/lib/sqlalchemy/dialects/postgresql/constraints.py b/lib/sqlalchemy/dialects/postgresql/constraints.py index 2eed2fb36..e8ebc75dd 100644 --- a/lib/sqlalchemy/dialects/postgresql/constraints.py +++ b/lib/sqlalchemy/dialects/postgresql/constraints.py @@ -6,13 +6,15 @@ from sqlalchemy.schema import ColumnCollectionConstraint from sqlalchemy.sql import expression + class ExcludeConstraint(ColumnCollectionConstraint): """A table-level EXCLUDE constraint. Defines an EXCLUDE constraint as described in the `postgres documentation`__. - __ http://www.postgresql.org/docs/9.0/static/sql-createtable.html#SQL-CREATETABLE-EXCLUDE + __ http://www.postgresql.org/docs/9.0/\ +static/sql-createtable.html#SQL-CREATETABLE-EXCLUDE """ __visit_name__ = 'exclude_constraint' @@ -52,7 +54,7 @@ class ExcludeConstraint(ColumnCollectionConstraint): name=kw.get('name'), deferrable=kw.get('deferrable'), initially=kw.get('initially') - ) + ) self.operators = {} for col_or_string, op in elements: name = getattr(col_or_string, 'name', col_or_string) @@ -60,15 +62,14 @@ class ExcludeConstraint(ColumnCollectionConstraint): self.using = kw.get('using', 'gist') where = kw.get('where') if where: - self.where = expression._literal_as_text(where) + self.where = expression._literal_as_text(where) def copy(self, **kw): elements = [(col, self.operators[col]) for col in self.columns.keys()] c = self.__class__(*elements, - name=self.name, - deferrable=self.deferrable, - initially=self.initially) + name=self.name, + deferrable=self.deferrable, + initially=self.initially) c.dispatch._update(self.dispatch) return c - -- cgit v1.2.1