From: Mike Bayer Date: Wed, 29 May 2019 22:49:38 +0000 (-0400) Subject: Fix rst flake8 issues that have come online w/ latest update X-Git-Tag: rel_1_0_11~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31520ac8fffee84514a5ca2b6625486dbce939d4;p=thirdparty%2Fsqlalchemy%2Falembic.git Fix rst flake8 issues that have come online w/ latest update of flake8-rst-docstrings Change-Id: I19288e69128648045d826045343fa5c1c8426ec2 --- diff --git a/alembic/config.py b/alembic/config.py index 4ba2a6cf..745ca8b3 100644 --- a/alembic/config.py +++ b/alembic/config.py @@ -12,7 +12,7 @@ from .util.compat import SafeConfigParser class Config(object): - """Represent an Alembic configuration. + r"""Represent an Alembic configuration. Within an ``env.py`` script, this is available via the :attr:`.EnvironmentContext.config` attribute, @@ -58,7 +58,7 @@ class Config(object): alembic_cfg.attributes['connection'] = connection command.upgrade(alembic_cfg, "head") - :param file_: name of the .ini file to open. + :param file\_: name of the .ini file to open. :param ini_section: name of the main Alembic section within the .ini file :param output_buffer: optional file-like input buffer which diff --git a/alembic/operations/base.py b/alembic/operations/base.py index 90b3500a..a4adf15e 100644 --- a/alembic/operations/base.py +++ b/alembic/operations/base.py @@ -393,7 +393,7 @@ class Operations(util.ModuleClsProxy): ) def inline_literal(self, value, type_=None): - """Produce an 'inline literal' expression, suitable for + r"""Produce an 'inline literal' expression, suitable for using in an INSERT, UPDATE, or DELETE statement. When using Alembic in "offline" mode, CRUD operations @@ -423,7 +423,7 @@ class Operations(util.ModuleClsProxy): numerics should be supported. Other types like boolean, dates, etc. may or may not be supported yet by various backends. - :param type_: optional - a :class:`sqlalchemy.types.TypeEngine` + :param type\_: optional - a :class:`sqlalchemy.types.TypeEngine` subclass stating the type of this value. In SQLAlchemy expressions, this is usually derived automatically from the Python type of the value itself, as well as diff --git a/alembic/operations/ops.py b/alembic/operations/ops.py index 90f35cd3..c3eb469a 100644 --- a/alembic/operations/ops.py +++ b/alembic/operations/ops.py @@ -131,11 +131,11 @@ class DropConstraintOp(MigrateOperation): def drop_constraint( cls, operations, constraint_name, table_name, type_=None, schema=None ): - """Drop a constraint of the given name, typically via DROP CONSTRAINT. + r"""Drop a constraint of the given name, typically via DROP CONSTRAINT. :param constraint_name: name of the constraint. :param table_name: table name. - :param type_: optional, required on MySQL. can be + :param type\_: optional, required on MySQL. can be 'foreignkey', 'primary', 'unique', or 'check'. :param schema: Optional schema name to operate within. To control quoting of the schema outside of the default behavior, use @@ -1661,7 +1661,7 @@ class AlterColumnOp(AlterTableOp): schema=None, **kw ): - """Issue an "alter column" instruction using the + r"""Issue an "alter column" instruction using the current migration context. Generally, only that aspect of the column which @@ -1704,7 +1704,7 @@ class AlterColumnOp(AlterTableOp): :param new_column_name: Optional; specify a string name here to indicate the new name within a column rename operation. - :param type_: Optional; a :class:`~sqlalchemy.types.TypeEngine` + :param type\_: Optional; a :class:`~sqlalchemy.types.TypeEngine` type object to specify a change to the column's type. For SQLAlchemy types that also indicate a constraint (i.e. :class:`~sqlalchemy.types.Boolean`, :class:`~sqlalchemy.types.Enum`),