pep8: fixed multiple violations

Fixed violations:
* E128 continuation line under-indented for visual indent
* E251 unexpected spaces around keyword / parameter equals
* E265 block comment should start with '# '
* E713 test for membership should be 'not in'
* F402 import shadowed by loop variable
* H305  imports not grouped correctly
* H307  like imports should be grouped together'
* H402  one line docstring needs punctuation'
* H703  Multiple positional placeholders

Also enabled H803 check that didn't have any violations.

Change-Id: I957ab273ddc61b02763d6b60b21d11ed4e73d472
This commit is contained in:
Ihar Hrachyshka
2014-06-20 22:13:38 +02:00
parent aa2e75ceb7
commit f4c5c4c612
2 changed files with 4 additions and 3 deletions

View File

@@ -196,6 +196,7 @@ if os.name == 'nt':
else:
import base64
import hashlib
import posix_ipc
InterProcessLock = _PosixLock
FileLock = _FcntlLock

View File

@@ -79,11 +79,11 @@ class LockTestCase(test_base.BaseTestCase):
def test_synchronized_wrapped_function_metadata(self):
@lockutils.synchronized('whatever', 'test-')
def foo():
"""Bar"""
"""Bar."""
pass
self.assertEqual(foo.__doc__, 'Bar', "Wrapped function's docstring "
"got lost")
self.assertEqual(foo.__doc__, 'Bar.', "Wrapped function's docstring "
"got lost")
self.assertEqual(foo.__name__, 'foo', "Wrapped function's name "
"got mangled")