Fix incorrect use of flake8:noqa

Adding the comment flake8:noqa in a file will skip linting the entire
file. Most of the time, the intent was just to skip individual lines to
handle exception cases.

This gets rid of the "flake8:" prefix where it was used incorrectly and
fixes a few legitimate errors that were being hidden by the entire file
being skipped.

The behavior is change in flake8 to handle this better, which will
result in pep8 job failures if these are not fixes first. See more
information in the 3.6.0 release notes:

http://flake8.pycqa.org/en/latest/release-notes/3.6.0.html#features

Change-Id: I56cb20a7c8885c101826d4fe28c315de02b6ecb8
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2018-10-26 13:26:29 -05:00
parent 3b954791e4
commit e26b64c1a3
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
13 changed files with 16 additions and 17 deletions

@ -16,4 +16,4 @@
"""Availability Zone interface (v3 extension)""" """Availability Zone interface (v3 extension)"""
from cinderclient.v2.availability_zones import * # flake8: noqa from cinderclient.v2.availability_zones import * # noqa

@ -16,4 +16,4 @@
"""Capabilities interface (v3 extension)""" """Capabilities interface (v3 extension)"""
from cinderclient.v2.capabilities import * # flake8: noqa from cinderclient.v2.capabilities import * # noqa

@ -15,4 +15,4 @@
"""cgsnapshot interface (v3 extension).""" """cgsnapshot interface (v3 extension)."""
from cinderclient.v2.cgsnapshots import * # flake8: noqa from cinderclient.v2.cgsnapshots import * # noqa

@ -15,4 +15,4 @@
"""Consistencygroup interface (v3 extension).""" """Consistencygroup interface (v3 extension)."""
from cinderclient.v2.consistencygroups import * # flake8: noqa from cinderclient.v2.consistencygroups import * # noqa

@ -13,4 +13,4 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from cinderclient.v2.contrib.list_extensions import * # flake8: noqa from cinderclient.v2.contrib.list_extensions import * # noqa

@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from cinderclient.v2.limits import * # flake8: noqa from cinderclient.v2.limits import * # noqa

@ -15,4 +15,4 @@
"""Pools interface (v3 extension)""" """Pools interface (v3 extension)"""
from cinderclient.v2.pools import * # flake8: noqa from cinderclient.v2.pools import * # noqa

@ -19,4 +19,4 @@
QoS Specs interface. QoS Specs interface.
""" """
from cinderclient.v2.qos_specs import * # flake8: noqa from cinderclient.v2.qos_specs import * # noqa

@ -13,4 +13,4 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from cinderclient.v2.quota_classes import * # flake8: noqa from cinderclient.v2.quota_classes import * # noqa

@ -19,19 +19,17 @@ from __future__ import print_function
import argparse import argparse
import collections import collections
import os import os
import sys
from oslo_utils import strutils from oslo_utils import strutils
import six import six
import cinderclient
from cinderclient import api_versions from cinderclient import api_versions
from cinderclient import base from cinderclient import base
from cinderclient import exceptions from cinderclient import exceptions
from cinderclient import shell_utils from cinderclient import shell_utils
from cinderclient import utils from cinderclient import utils
from cinderclient.v2.shell import * # flake8: noqa from cinderclient.v2.shell import * # noqa
FILTER_DEPRECATED = ("This option is deprecated and will be removed in " FILTER_DEPRECATED = ("This option is deprecated and will be removed in "
"newer release. Please use '--filters' option which " "newer release. Please use '--filters' option which "
@ -637,8 +635,9 @@ def do_create(cs, args):
if args.poll: if args.poll:
timeout_period = os.environ.get("POLL_TIMEOUT_PERIOD", 3600) timeout_period = os.environ.get("POLL_TIMEOUT_PERIOD", 3600)
shell_utils._poll_for_status(cs.volumes.get, volume.id, info, 'creating', ['available'], shell_utils._poll_for_status(
timeout_period, cs.client.global_request_id, cs.messages) cs.volumes.get, volume.id, info, 'creating', ['available'],
timeout_period, cs.client.global_request_id, cs.messages)
utils.print_dict(info) utils.print_dict(info)

@ -18,4 +18,4 @@
This is part of the Volume Backups interface. This is part of the Volume Backups interface.
""" """
from cinderclient.v2.volume_backups_restore import * # flake8: noqa from cinderclient.v2.volume_backups_restore import * # noqa

@ -18,4 +18,4 @@
Volume Encryption Type interface Volume Encryption Type interface
""" """
from cinderclient.v2.volume_encryption_types import * # flake8: noqa from cinderclient.v2.volume_encryption_types import * # noqa

@ -14,4 +14,4 @@
"""Volume type access interface.""" """Volume type access interface."""
from cinderclient.v2.volume_type_access import * # flake8: noqa from cinderclient.v2.volume_type_access import * # noqa