Start using pyflakes
Enable Pyflakes tests. Fix those warnings that occur. Also explicitely list the pep8 warnings that currently fail. Change-Id: Icfd7bf23007a99187cfee66cbd630e0e885bf7d3
This commit is contained in:
@@ -13,4 +13,4 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from ceilometerclient.v1.client import Client
|
||||
from ceilometerclient.v1.client import Client # noqa
|
||||
|
||||
@@ -13,4 +13,4 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from ceilometerclient.v2.client import Client
|
||||
from ceilometerclient.v2.client import Client # noqa
|
||||
|
||||
@@ -107,7 +107,7 @@ def _display_alarm(alarm):
|
||||
fields = ['name', 'description', 'counter_name', 'period',
|
||||
'evaluation_periods', 'threshold', 'comparison_operator',
|
||||
'state', 'enabled', 'alarm_id', 'user_id', 'project_id',
|
||||
'alarm_actions', 'ok_actions', 'insufficient_data_actions']
|
||||
'alarm_actions', 'ok_actions', 'insufficient_data_actions']
|
||||
data = dict([(f, getattr(alarm, f, '')) for f in fields])
|
||||
utils.print_dict(data, wrap=72)
|
||||
|
||||
@@ -218,7 +218,7 @@ def do_alarm_delete(cc, args={}):
|
||||
if args.alarm_id is None:
|
||||
raise exc.CommandError('Alarm ID not provided (-a <alarm id>)')
|
||||
try:
|
||||
resource = cc.alarms.delete(args.alarm_id)
|
||||
cc.alarms.delete(args.alarm_id)
|
||||
except exc.HTTPNotFound:
|
||||
raise exc.CommandError('Alarm not found: %s' % args.alarm_id)
|
||||
|
||||
|
||||
@@ -6,10 +6,6 @@ import sys
|
||||
import fixtures
|
||||
from testtools import matchers
|
||||
|
||||
try:
|
||||
import json
|
||||
except ImportError:
|
||||
import simplejson as json
|
||||
from keystoneclient.v2_0 import client as ksclient
|
||||
|
||||
from ceilometerclient import exc
|
||||
|
||||
2
tox.ini
2
tox.ini
@@ -24,6 +24,6 @@ commands = python setup.py testr --coverage --testr-args='{posargs}'
|
||||
commands = {posargs}
|
||||
|
||||
[flake8]
|
||||
ignore = E12,E711,E721,E712,F,H302
|
||||
ignore = E121,E122,E123,E128,E711,E721,E712,H302
|
||||
show-source = True
|
||||
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools
|
||||
|
||||
Reference in New Issue
Block a user