Adds empty line to multilines docs to pass H405

Adds empty line to multilines docs to pass H405 check.
Removes H405 from ignore setting in tox.ini.

Change-Id: I0516fb12765bf961a4488570a6c73b80f667d972
This commit is contained in:
Petr Blaho 2014-06-12 15:17:50 +02:00
parent 0996c5d016
commit 3cb592775d
6 changed files with 32 additions and 19 deletions

View File

@ -226,9 +226,10 @@ def _db2_dupe_key_error(integrity_error, match, engine_name, is_disconnect):
@filters("mysql", sqla_exc.DBAPIError, r".*\b1146\b")
def _raise_mysql_table_doesnt_exist_asis(
error, match, engine_name, is_disconnect):
"""Raise MySQL error 1146 as is, so that it does not conflict with
the MySQL dialect's checking a table not existing.
"""Raise MySQL error 1146 as is.
Raise MySQL error 1146 as is, so that it does not conflict with
the MySQL dialect's checking a table not existing.
"""
raise error
@ -237,9 +238,10 @@ def _raise_mysql_table_doesnt_exist_asis(
@filters("*", sqla_exc.OperationalError, r".*")
def _raise_operational_errors_directly_filter(operational_error,
match, engine_name, is_disconnect):
"""Filter for all remaining OperationalError classes and apply
special rules.
"""Filter for all remaining OperationalError classes and apply.
Filter for all remaining OperationalError classes and apply
special rules.
"""
if is_disconnect:
# operational errors that represent disconnect
@ -262,9 +264,10 @@ def _is_db_connection_error(operational_error, match, engine_name,
@filters("*", sqla_exc.DBAPIError, r".*")
def _raise_for_remaining_DBAPIError(error, match, engine_name, is_disconnect):
"""Filter for remaining DBAPIErrors and wrap if they represent
a disconnect error.
"""Filter for remaining DBAPIErrors.
Filter for remaining DBAPIErrors and wrap if they represent
a disconnect error.
"""
if is_disconnect:
raise exception.DBConnectionError(error)
@ -327,9 +330,10 @@ def register_engine(engine):
def handle_connect_error(engine):
"""Provide a special context that will allow on-connect errors
to be raised within the filtering context.
"""Handle connect error.
Provide a special context that will allow on-connect errors
to be raised within the filtering context.
"""
try:
return engine.connect()

View File

@ -338,9 +338,10 @@ def _thread_yield(dbapi_con, con_record):
def _begin_ping_listener(connection):
"""Ping the server at transaction begin and transparently reconnect
if a disconnect exception occurs.
"""Ping the server at transaction begin.
Ping the server at transaction begin and transparently reconnect
if a disconnect exception occurs.
"""
try:
# run a SELECT 1. use a core select() so that
@ -531,9 +532,10 @@ def get_maker(engine, autocommit=True, expire_on_commit=False):
def _add_trace_comments(engine):
"""Augment statements with a trace of the immediate calling code
for a given statement.
"""Add trace comments.
Augment statements with a trace of the immediate calling code
for a given statement.
"""
import os

View File

@ -144,7 +144,9 @@ class TestFallthroughsAndNonDBAPI(TestsExceptionFilter):
matched.message)
def test_operational_error_asis(self):
"""test that SQLAlchemy OperationalErrors that aren't disconnects
"""Test operational errors.
test that SQLAlchemy OperationalErrors that aren't disconnects
are passed through without wrapping.
"""
@ -504,8 +506,9 @@ class IntegrationTest(test_base.DbTestCase):
self.assertRaises(exception.DBDuplicateEntry, _session.flush)
def test_autoflush_wrapper_duplicate_entry(self):
"""test a duplicate entry exception raised via
query.all()-> autoflush
"""Test a duplicate entry exception raised.
test a duplicate entry exception raised via query.all()-> autoflush
"""
_session = self.sessionmaker()

View File

@ -37,14 +37,17 @@ class TestAlembicExtension(test_base.BaseTestCase):
super(TestAlembicExtension, self).setUp()
def test_check_enabled_true(self, command):
"""Verifies that enabled returns True on non empty
"""Check enabled returns True
Verifies that enabled returns True on non empty
alembic_ini_path conf variable
"""
self.assertTrue(self.alembic.enabled)
def test_check_enabled_false(self, command):
"""Verifies enabled returns False on empty
alembic_ini_path variable
"""Check enabled returns False
Verifies enabled returns False on empty alembic_ini_path variable
"""
self.migration_config['alembic_ini_path'] = ''
alembic = ext_alembic.AlembicExtension(self.migration_config)

View File

@ -183,6 +183,7 @@ class MySQLStrictAllTablesModeTestCase(MySQLModeTestCase):
class MySQLTraditionalModeTestCase(MySQLStrictAllTablesModeTestCase):
"""Test data integrity enforcement in MySQL TRADITIONAL mode.
Since TRADITIONAL includes STRICT_ALL_TABLES, this inherits all
STRICT_ALL_TABLES mode tests.
"""

View File

@ -45,7 +45,7 @@ commands =
# see https://bugs.launchpad.net/hacking/+bug/1329363
show-source = True
ignore = E123,E125,E128,E265,H305,H307,H405,H703,H803,H904
ignore = E123,E125,E128,E265,H305,H307,H703,H803,H904
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build