diff options
Diffstat (limited to 'lib/sqlalchemy/sql')
-rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/sql/ddl.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/sql/dml.py | 26 | ||||
-rw-r--r-- | lib/sqlalchemy/sql/elements.py | 50 | ||||
-rw-r--r-- | lib/sqlalchemy/sql/functions.py | 8 | ||||
-rw-r--r-- | lib/sqlalchemy/sql/operators.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/sql/schema.py | 18 | ||||
-rw-r--r-- | lib/sqlalchemy/sql/selectable.py | 64 | ||||
-rw-r--r-- | lib/sqlalchemy/sql/sqltypes.py | 4 | ||||
-rw-r--r-- | lib/sqlalchemy/sql/util.py | 2 |
10 files changed, 89 insertions, 89 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 99defd861..aeb40030f 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -281,7 +281,7 @@ class Compiled(object): class TypeCompiler(util.with_metaclass(util.EnsureKWArgType, object)): """Produces DDL specification for TypeEngine objects.""" - ensure_kwarg = 'visit_\w+' + ensure_kwarg = r'visit_\w+' def __init__(self, dialect): self.dialect = dialect diff --git a/lib/sqlalchemy/sql/ddl.py b/lib/sqlalchemy/sql/ddl.py index fd930ddc9..5463afe99 100644 --- a/lib/sqlalchemy/sql/ddl.py +++ b/lib/sqlalchemy/sql/ddl.py @@ -143,7 +143,7 @@ class DDLElement(Executable, _DDLCompiles): @_generative def execute_if(self, dialect=None, callable_=None, state=None): - """Return a callable that will execute this + r"""Return a callable that will execute this DDLElement conditionally. Used to provide a wrapper for event listening:: diff --git a/lib/sqlalchemy/sql/dml.py b/lib/sqlalchemy/sql/dml.py index cd58cbeb0..767e91350 100644 --- a/lib/sqlalchemy/sql/dml.py +++ b/lib/sqlalchemy/sql/dml.py @@ -92,13 +92,13 @@ class UpdateBase( @_generative def returning(self, *cols): - """Add a :term:`RETURNING` or equivalent clause to this statement. + r"""Add a :term:`RETURNING` or equivalent clause to this statement. e.g.:: - stmt = table.update().\\ - where(table.c.data == 'value').\\ - values(status='X').\\ + stmt = table.update().\ + where(table.c.data == 'value').\ + values(status='X').\ returning(table.c.server_flag, table.c.updated_timestamp) @@ -206,7 +206,7 @@ class ValuesBase(UpdateBase): @_generative def values(self, *args, **kwargs): - """specify a fixed VALUES clause for an INSERT statement, or the SET + r"""specify a fixed VALUES clause for an INSERT statement, or the SET clause for an UPDATE. Note that the :class:`.Insert` and :class:`.Update` constructs support @@ -616,21 +616,21 @@ class Update(ValuesBase): return_defaults=False, preserve_parameter_order=False, **dialect_kw): - """Construct an :class:`.Update` object. + r"""Construct an :class:`.Update` object. E.g.:: from sqlalchemy import update - stmt = update(users).where(users.c.id==5).\\ + stmt = update(users).where(users.c.id==5).\ values(name='user #5') Similar functionality is available via the :meth:`~.TableClause.update` method on :class:`.Table`:: - stmt = users.update().\\ - where(users.c.id==5).\\ + stmt = users.update().\ + where(users.c.id==5).\ values(name='user #5') :param table: A :class:`.Table` object representing the database @@ -650,8 +650,8 @@ class Update(ValuesBase): subquery:: users.update().values(name='ed').where( - users.c.name==select([addresses.c.email_address]).\\ - where(addresses.c.user_id==users.c.id).\\ + users.c.name==select([addresses.c.email_address]).\ + where(addresses.c.user_id==users.c.id).\ as_scalar() ) @@ -719,8 +719,8 @@ class Update(ValuesBase): being updated:: users.update().values( - name=select([addresses.c.email_address]).\\ - where(addresses.c.user_id==users.c.id).\\ + name=select([addresses.c.email_address]).\ + where(addresses.c.user_id==users.c.id).\ as_scalar() ) diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py index 93ae0c638..a450efaf0 100644 --- a/lib/sqlalchemy/sql/elements.py +++ b/lib/sqlalchemy/sql/elements.py @@ -105,7 +105,7 @@ def between(expr, lower_bound, upper_bound, symmetric=False): def literal(value, type_=None): - """Return a literal clause, bound to a bind parameter. + r"""Return a literal clause, bound to a bind parameter. Literal clauses are created automatically when non- :class:`.ClauseElement` objects (such as strings, ints, dates, etc.) are @@ -305,7 +305,7 @@ class ClauseElement(Visitable): return cloned_traverse(self, {}, {'bindparam': visit_bindparam}) def compare(self, other, **kw): - """Compare this ClauseElement to the given ClauseElement. + r"""Compare this ClauseElement to the given ClauseElement. Subclasses should override the default behavior, which is a straight identity comparison. @@ -331,7 +331,7 @@ class ClauseElement(Visitable): pass def get_children(self, **kwargs): - """Return immediate child elements of this :class:`.ClauseElement`. + r"""Return immediate child elements of this :class:`.ClauseElement`. This is used for visit traversal. @@ -835,14 +835,14 @@ class ColumnElement(operators.ColumnOperators, ClauseElement): class BindParameter(ColumnElement): - """Represent a "bound expression". + r"""Represent a "bound expression". :class:`.BindParameter` is invoked explicitly using the :func:`.bindparam` function, as in:: from sqlalchemy import bindparam - stmt = select([users_table]).\\ + stmt = select([users_table]).\ where(users_table.c.name == bindparam('username')) Detailed discussion of how :class:`.BindParameter` is used is @@ -864,7 +864,7 @@ class BindParameter(ColumnElement): isoutparam=False, _compared_to_operator=None, _compared_to_type=None): - """Produce a "bound expression". + r"""Produce a "bound expression". The return value is an instance of :class:`.BindParameter`; this is a :class:`.ColumnElement` subclass which represents a so-called @@ -888,7 +888,7 @@ class BindParameter(ColumnElement): from sqlalchemy import bindparam - stmt = select([users_table]).\\ + stmt = select([users_table]).\ where(users_table.c.name == bindparam('username')) The above statement, when rendered, will produce SQL similar to:: @@ -1240,7 +1240,7 @@ class TextClause(Executable, ClauseElement): @classmethod def _create_text(self, text, bind=None, bindparams=None, typemap=None, autocommit=None): - """Construct a new :class:`.TextClause` clause, representing + r"""Construct a new :class:`.TextClause` clause, representing a textual SQL string directly. E.g.:: @@ -1268,7 +1268,7 @@ class TextClause(Executable, ClauseElement): For SQL statements where a colon is required verbatim, as within an inline string, use a backslash to escape:: - t = text("SELECT * FROM users WHERE name='\\:username'") + t = text("SELECT * FROM users WHERE name='\:username'") The :class:`.TextClause` construct includes methods which can provide information about the bound parameters as well as the column @@ -1278,8 +1278,8 @@ class TextClause(Executable, ClauseElement): parameter detail, and :meth:`.TextClause.columns` method allows specification of return columns including names and types:: - t = text("SELECT * FROM users WHERE id=:user_id").\\ - bindparams(user_id=7).\\ + t = text("SELECT * FROM users WHERE id=:user_id").\ + bindparams(user_id=7).\ columns(id=Integer, name=String) for id, name in connection.execute(t): @@ -1301,7 +1301,7 @@ class TextClause(Executable, ClauseElement): can be set explicitly so using the :paramref:`.Connection.execution_options.autocommit` option:: - t = text("EXEC my_procedural_thing()").\\ + t = text("EXEC my_procedural_thing()").\ execution_options(autocommit=True) Note that SQLAlchemy's usual "autocommit" behavior applies to @@ -1333,7 +1333,7 @@ class TextClause(Executable, ClauseElement): Is equivalent to:: - stmt = text("SELECT * FROM table WHERE id=:id").\\ + stmt = text("SELECT * FROM table WHERE id=:id").\ bindparams(bindparam('id', value=5, type_=Integer)) .. deprecated:: 0.9.0 the :meth:`.TextClause.bindparams` method @@ -1495,7 +1495,7 @@ class TextClause(Executable, ClauseElement): stmt = text("SELECT id, name FROM some_table") stmt = stmt.columns(column('id'), column('name')).alias('st') - stmt = select([mytable]).\\ + stmt = select([mytable]).\ select_from( mytable.join(stmt, mytable.c.name == stmt.c.name) ).where(stmt.c.id > 5) @@ -1921,8 +1921,8 @@ class BooleanClauseList(ClauseList, ColumnElement): times against a statement, which will have the effect of each clause being combined using :func:`.and_`:: - stmt = select([users_table]).\\ - where(users_table.c.name == 'wendy').\\ + stmt = select([users_table]).\ + where(users_table.c.name == 'wendy').\ where(users_table.c.enrolled == True) .. seealso:: @@ -2034,7 +2034,7 @@ class Case(ColumnElement): from sqlalchemy import case - stmt = select([users_table]).\\ + stmt = select([users_table]).\ where( case( [ @@ -2056,7 +2056,7 @@ class Case(ColumnElement): __visit_name__ = 'case' def __init__(self, whens, value=None, else_=None): - """Produce a ``CASE`` expression. + r"""Produce a ``CASE`` expression. The ``CASE`` construct in SQL is a conditional object that acts somewhat analogously to an "if/then" construct in other @@ -2067,7 +2067,7 @@ class Case(ColumnElement): from sqlalchemy import case - stmt = select([users_table]).\\ + stmt = select([users_table]).\ where( case( [ @@ -2096,7 +2096,7 @@ class Case(ColumnElement): compared against keyed to result expressions. The statement below is equivalent to the preceding statement:: - stmt = select([users_table]).\\ + stmt = select([users_table]).\ where( case( {"wendy": "W", "jack": "J"}, @@ -2233,7 +2233,7 @@ class Case(ColumnElement): def literal_column(text, type_=None): - """Produce a :class:`.ColumnClause` object that has the + r"""Produce a :class:`.ColumnClause` object that has the :paramref:`.column.is_literal` flag set to True. :func:`.literal_column` is similar to :func:`.column`, except that @@ -2555,7 +2555,7 @@ class UnaryExpression(ColumnElement): from sqlalchemy import desc, nullsfirst - stmt = select([users_table]).\\ + stmt = select([users_table]).\ order_by(nullsfirst(desc(users_table.c.name))) The SQL expression from the above would resemble:: @@ -2598,7 +2598,7 @@ class UnaryExpression(ColumnElement): from sqlalchemy import desc, nullslast - stmt = select([users_table]).\\ + stmt = select([users_table]).\ order_by(nullslast(desc(users_table.c.name))) The SQL expression from the above would resemble:: @@ -2610,7 +2610,7 @@ class UnaryExpression(ColumnElement): :meth:`.ColumnElement.nullslast`, rather than as its standalone function version, as in:: - stmt = select([users_table]).\\ + stmt = select([users_table]).\ order_by(users_table.c.name.desc().nullslast()) .. seealso:: @@ -3292,7 +3292,7 @@ class WithinGroup(ColumnElement): order_by = None def __init__(self, element, *order_by): - """Produce a :class:`.WithinGroup` object against a function. + r"""Produce a :class:`.WithinGroup` object against a function. Used against so-called "ordered set aggregate" and "hypothetical set aggregate" functions, including :class:`.percentile_cont`, diff --git a/lib/sqlalchemy/sql/functions.py b/lib/sqlalchemy/sql/functions.py index 4e87afb94..08f1d32a5 100644 --- a/lib/sqlalchemy/sql/functions.py +++ b/lib/sqlalchemy/sql/functions.py @@ -191,7 +191,7 @@ class FunctionElement(Executable, ColumnElement, FromClause): return None def alias(self, name=None, flat=False): - """Produce a :class:`.Alias` construct against this + r"""Produce a :class:`.Alias` construct against this :class:`.FunctionElement`. This construct wraps the function in a named alias which @@ -202,8 +202,8 @@ class FunctionElement(Executable, ColumnElement, FromClause): from sqlalchemy.sql import column - stmt = select([column('data_view')]).\\ - select_from(SomeTable).\\ + stmt = select([column('data_view')]).\ + select_from(SomeTable).\ select_from(func.unnest(SomeTable.data).alias('data_view') ) @@ -618,7 +618,7 @@ class random(GenericFunction): class count(GenericFunction): - """The ANSI COUNT aggregate function. With no arguments, + r"""The ANSI COUNT aggregate function. With no arguments, emits COUNT \*. """ diff --git a/lib/sqlalchemy/sql/operators.py b/lib/sqlalchemy/sql/operators.py index 79cc57e42..49744568a 100644 --- a/lib/sqlalchemy/sql/operators.py +++ b/lib/sqlalchemy/sql/operators.py @@ -159,7 +159,7 @@ class Operators(object): return against def operate(self, op, *other, **kwargs): - """Operate on an argument. + r"""Operate on an argument. This is the lowest level of operation, raises :class:`NotImplementedError` by default. diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py index edf939a24..793750f1c 100644 --- a/lib/sqlalchemy/sql/schema.py +++ b/lib/sqlalchemy/sql/schema.py @@ -116,7 +116,7 @@ class SchemaItem(SchemaEventTarget, visitors.Visitable): class Table(DialectKWArgs, SchemaItem, TableClause): - """Represent a table in a database. + r"""Represent a table in a database. e.g.:: @@ -893,7 +893,7 @@ class Column(SchemaItem, ColumnClause): __visit_name__ = 'column' def __init__(self, *args, **kwargs): - """ + r""" Construct a new ``Column`` object. :param name: The name of this column as represented in the database. @@ -1512,7 +1512,7 @@ class ForeignKey(DialectKWArgs, SchemaItem): initially=None, link_to_name=False, match=None, info=None, **dialect_kw): - """ + r""" Construct a column-level FOREIGN KEY. The :class:`.ForeignKey` object when constructed generates a @@ -2417,7 +2417,7 @@ class Constraint(DialectKWArgs, SchemaItem): def __init__(self, name=None, deferrable=None, initially=None, _create_rule=None, info=None, _type_bound=False, **dialect_kw): - """Create a SQL constraint. + r"""Create a SQL constraint. :param name: Optional, the in-database name of this ``Constraint``. @@ -2604,7 +2604,7 @@ class ColumnCollectionConstraint(ColumnCollectionMixin, Constraint): """A constraint that proxies a ColumnCollection.""" def __init__(self, *columns, **kw): - """ + r""" :param \*columns: A sequence of column names or Column objects. @@ -2671,7 +2671,7 @@ class CheckConstraint(ColumnCollectionConstraint): def __init__(self, sqltext, name=None, deferrable=None, initially=None, table=None, info=None, _create_rule=None, _autoattach=True, _type_bound=False): - """Construct a CHECK constraint. + r"""Construct a CHECK constraint. :param sqltext: A string containing the constraint definition, which will be used @@ -2759,7 +2759,7 @@ class ForeignKeyConstraint(ColumnCollectionConstraint): ondelete=None, deferrable=None, initially=None, use_alter=False, link_to_name=False, match=None, table=None, info=None, **dialect_kw): - """Construct a composite-capable FOREIGN KEY. + r"""Construct a composite-capable FOREIGN KEY. :param columns: A sequence of local column names. The named columns must be defined and present in the parent Table. The names should @@ -3278,7 +3278,7 @@ class Index(DialectKWArgs, ColumnCollectionMixin, SchemaItem): __visit_name__ = 'index' def __init__(self, name, *expressions, **kw): - """Construct an index object. + r"""Construct an index object. :param name: The name of the index @@ -3704,7 +3704,7 @@ class MetaData(SchemaItem): extend_existing=False, autoload_replace=True, **dialect_kwargs): - """Load all available table definitions from the database. + r"""Load all available table definitions from the database. Automatically creates ``Table`` entries in this ``MetaData`` for any table available in the database but not yet present in the diff --git a/lib/sqlalchemy/sql/selectable.py b/lib/sqlalchemy/sql/selectable.py index 1840d646d..91a12bd33 100644 --- a/lib/sqlalchemy/sql/selectable.py +++ b/lib/sqlalchemy/sql/selectable.py @@ -103,7 +103,7 @@ def _offset_or_limit_clause_asint(clause, attrname): def subquery(alias, *args, **kwargs): - """Return an :class:`.Alias` object derived + r"""Return an :class:`.Alias` object derived from a :class:`.Select`. name @@ -244,7 +244,7 @@ class HasPrefixes(object): @_generative def prefix_with(self, *expr, **kw): - """Add one or more expressions following the statement keyword, i.e. + r"""Add one or more expressions following the statement keyword, i.e. SELECT, INSERT, UPDATE, or DELETE. Generative. This is used to support backend-specific prefix keywords such as those @@ -281,7 +281,7 @@ class HasSuffixes(object): @_generative def suffix_with(self, *expr, **kw): - """Add one or more expressions following the statement as a whole. + r"""Add one or more expressions following the statement as a whole. This is used to support backend-specific suffix keywords on certain constructs. @@ -1055,14 +1055,14 @@ class Join(FromClause): "join explicitly." % (a.description, b.description)) def select(self, whereclause=None, **kwargs): - """Create a :class:`.Select` from this :class:`.Join`. + r"""Create a :class:`.Select` from this :class:`.Join`. The equivalent long-hand form, given a :class:`.Join` object ``j``, is:: from sqlalchemy import select - j = select([j.left, j.right], **kw).\\ - where(whereclause).\\ + j = select([j.left, j.right], **kw).\ + where(whereclause).\ select_from(j) :param whereclause: the WHERE criterion that will be sent to @@ -1082,7 +1082,7 @@ class Join(FromClause): @util.dependencies("sqlalchemy.sql.util") def alias(self, sqlutil, name=None, flat=False): - """return an alias of this :class:`.Join`. + r"""return an alias of this :class:`.Join`. The default behavior here is to first produce a SELECT construct from this :class:`.Join`, then to produce an @@ -1107,9 +1107,9 @@ class Join(FromClause): from sqlalchemy import select, alias j = alias( - select([j.left, j.right]).\\ - select_from(j).\\ - with_labels(True).\\ + select([j.left, j.right]).\ + select_from(j).\ + with_labels(True).\ correlate(False), name=name ) @@ -1438,7 +1438,7 @@ class HasCTE(object): """ def cte(self, name=None, recursive=False): - """Return a new :class:`.CTE`, or Common Table Expression instance. + r"""Return a new :class:`.CTE`, or Common Table Expression instance. Common table expressions are a SQL standard whereby SELECT statements can draw upon secondary statements specified along @@ -1493,7 +1493,7 @@ class HasCTE(object): ]).group_by(orders.c.region).cte("regional_sales") - top_regions = select([regional_sales.c.region]).\\ + top_regions = select([regional_sales.c.region]).\ where( regional_sales.c.total_sales > select([ @@ -1528,8 +1528,8 @@ class HasCTE(object): included_parts = select([ parts.c.sub_part, parts.c.part, - parts.c.quantity]).\\ - where(parts.c.part=='our part').\\ + parts.c.quantity]).\ + where(parts.c.part=='our part').\ cte(recursive=True) @@ -1548,7 +1548,7 @@ class HasCTE(object): included_parts.c.sub_part, func.sum(included_parts.c.quantity). label('total_quantity') - ]).\\ + ]).\ group_by(included_parts.c.sub_part) result = conn.execute(statement).fetchall() @@ -2279,7 +2279,7 @@ class CompoundSelect(GenerativeSelect): @classmethod def _create_union(cls, *selects, **kwargs): - """Return a ``UNION`` of multiple selectables. + r"""Return a ``UNION`` of multiple selectables. The returned object is an instance of :class:`.CompoundSelect`. @@ -2299,7 +2299,7 @@ class CompoundSelect(GenerativeSelect): @classmethod def _create_union_all(cls, *selects, **kwargs): - """Return a ``UNION ALL`` of multiple selectables. + r"""Return a ``UNION ALL`` of multiple selectables. The returned object is an instance of :class:`.CompoundSelect`. @@ -2319,7 +2319,7 @@ class CompoundSelect(GenerativeSelect): @classmethod def _create_except(cls, *selects, **kwargs): - """Return an ``EXCEPT`` of multiple selectables. + r"""Return an ``EXCEPT`` of multiple selectables. The returned object is an instance of :class:`.CompoundSelect`. @@ -2336,7 +2336,7 @@ class CompoundSelect(GenerativeSelect): @classmethod def _create_except_all(cls, *selects, **kwargs): - """Return an ``EXCEPT ALL`` of multiple selectables. + r"""Return an ``EXCEPT ALL`` of multiple selectables. The returned object is an instance of :class:`.CompoundSelect`. @@ -2353,7 +2353,7 @@ class CompoundSelect(GenerativeSelect): @classmethod def _create_intersect(cls, *selects, **kwargs): - """Return an ``INTERSECT`` of multiple selectables. + r"""Return an ``INTERSECT`` of multiple selectables. The returned object is an instance of :class:`.CompoundSelect`. @@ -2370,7 +2370,7 @@ class CompoundSelect(GenerativeSelect): @classmethod def _create_intersect_all(cls, *selects, **kwargs): - """Return an ``INTERSECT ALL`` of multiple selectables. + r"""Return an ``INTERSECT ALL`` of multiple selectables. The returned object is an instance of :class:`.CompoundSelect`. @@ -2874,7 +2874,7 @@ class Select(HasPrefixes, HasSuffixes, GenerativeSelect): @_generative def with_hint(self, selectable, text, dialect_name='*'): - """Add an indexing or other executional context hint for the given + r"""Add an indexing or other executional context hint for the given selectable to this :class:`.Select`. The text of the hint is rendered in the appropriate @@ -2886,7 +2886,7 @@ class Select(HasPrefixes, HasSuffixes, GenerativeSelect): the table or alias. E.g. when using Oracle, the following:: - select([mytable]).\\ + select([mytable]).\ with_hint(mytable, "index(%(name)s ix_mytable)") Would render SQL as:: @@ -2897,8 +2897,8 @@ class Select(HasPrefixes, HasSuffixes, GenerativeSelect): hint to a particular backend. Such as, to add hints for both Oracle and Sybase simultaneously:: - select([mytable]).\\ - with_hint(mytable, "index(%(name)s ix_mytable)", 'oracle').\\ + select([mytable]).\ + with_hint(mytable, "index(%(name)s ix_mytable)", 'oracle').\ with_hint(mytable, "WITH INDEX ix_mytable", 'sybase') .. seealso:: @@ -3060,7 +3060,7 @@ class Select(HasPrefixes, HasSuffixes, GenerativeSelect): @_generative def with_only_columns(self, columns): - """Return a new :func:`.select` construct with its columns + r"""Return a new :func:`.select` construct with its columns clause replaced with the given columns. .. versionchanged:: 0.7.3 @@ -3111,7 +3111,7 @@ class Select(HasPrefixes, HasSuffixes, GenerativeSelect): else (i.e. not in the WHERE clause, etc.) is to set it using :meth:`.Select.select_from`:: - >>> s1 = select([table1.c.a, table2.c.b]).\\ + >>> s1 = select([table1.c.a, table2.c.b]).\ ... select_from(table1.join(table2, ... table1.c.a==table2.c.a)) >>> s2 = s1.with_only_columns([table2.c.b]) @@ -3174,7 +3174,7 @@ class Select(HasPrefixes, HasSuffixes, GenerativeSelect): @_generative def distinct(self, *expr): - """Return a new select() construct which will apply DISTINCT to its + r"""Return a new select() construct which will apply DISTINCT to its columns clause. :param \*expr: optional column expressions. When present, @@ -3193,7 +3193,7 @@ class Select(HasPrefixes, HasSuffixes, GenerativeSelect): @_generative def select_from(self, fromclause): - """return a new :func:`.select` construct with the + r"""return a new :func:`.select` construct with the given FROM expression merged into its list of FROM objects. @@ -3201,7 +3201,7 @@ class Select(HasPrefixes, HasSuffixes, GenerativeSelect): table1 = table('t1', column('a')) table2 = table('t2', column('b')) - s = select([table1.c.a]).\\ + s = select([table1.c.a]).\ select_from( table1.join(table2, table1.c.a==table2.c.b) ) @@ -3227,7 +3227,7 @@ class Select(HasPrefixes, HasSuffixes, GenerativeSelect): @_generative def correlate(self, *fromclauses): - """return a new :class:`.Select` which will correlate the given FROM + r"""return a new :class:`.Select` which will correlate the given FROM clauses to that of an enclosing :class:`.Select`. Calling this method turns off the :class:`.Select` object's @@ -3290,7 +3290,7 @@ class Select(HasPrefixes, HasSuffixes, GenerativeSelect): @_generative def correlate_except(self, *fromclauses): - """return a new :class:`.Select` which will omit the given FROM + r"""return a new :class:`.Select` which will omit the given FROM clauses from the auto-correlation process. Calling :meth:`.Select.correlate_except` turns off the diff --git a/lib/sqlalchemy/sql/sqltypes.py b/lib/sqlalchemy/sql/sqltypes.py index 713c8a2ef..dd5e6d01b 100644 --- a/lib/sqlalchemy/sql/sqltypes.py +++ b/lib/sqlalchemy/sql/sqltypes.py @@ -660,7 +660,7 @@ class Float(Numeric): def __init__(self, precision=None, asdecimal=False, decimal_return_scale=None, **kwargs): - """ + r""" Construct a Float. :param precision: the numeric precision for use in DDL ``CREATE @@ -1151,7 +1151,7 @@ class Enum(String, SchemaType): __visit_name__ = 'enum' def __init__(self, *enums, **kw): - """Construct an enum. + r"""Construct an enum. Keyword arguments which don't apply to a specific backend are ignored by that backend. diff --git a/lib/sqlalchemy/sql/util.py b/lib/sqlalchemy/sql/util.py index 88ded1aa7..281d5f6a3 100644 --- a/lib/sqlalchemy/sql/util.py +++ b/lib/sqlalchemy/sql/util.py @@ -462,7 +462,7 @@ def splice_joins(left, right, stop_on=None): def reduce_columns(columns, *clauses, **kw): - """given a list of columns, return a 'reduced' set based on natural + r"""given a list of columns, return a 'reduced' set based on natural equivalents. the set is reduced to the smallest list of columns which have no natural |