Fix Further Pyflakes warnings

Fix occurences of F811 and F821.

Change-Id: I961e62e818ab846f7e1bbc1fdabfe8c051fd70eb
This commit is contained in:
Dirk Mueller 2013-06-01 16:09:21 +02:00
parent d511d64edc
commit e4ea445a5f
5 changed files with 3 additions and 30 deletions

View File

@ -1,6 +1,7 @@
import logging
from django.utils.translation import ugettext_lazy as _
from django import template
from horizon import tables

View File

@ -8,8 +8,6 @@ from django import http
from horizon.workflows.views import WorkflowView
from mox import IsA
from openstack_dashboard import api
from openstack_dashboard.api.lbaas import Member
from openstack_dashboard.api.lbaas import Pool

View File

@ -668,7 +668,7 @@ class NetworkSubnetTests(test.TestCase):
@test.create_stubs({api.quantum: ('network_get',
'subnet_create',)})
def test_subnet_create_post_with_additional_attributes(self):
def test_subnet_create_post_with_additional_attributes_no_gateway(self):
network = self.networks.first()
subnet = self.subnets.first()
api.quantum.network_get(IsA(http.HttpRequest),
@ -988,29 +988,6 @@ class NetworkSubnetTests(test.TestCase):
'host_routes: Invalid IP address '
'(value=%s)' % host_routes.split(',')[1])
@test.create_stubs({api.quantum: ('subnet_modify',
'subnet_get',)})
def test_subnet_update_post(self):
subnet = self.subnets.first()
api.quantum.subnet_get(IsA(http.HttpRequest), subnet.id)\
.AndReturn(subnet)
api.quantum.subnet_modify(IsA(http.HttpRequest), subnet.id,
name=subnet.name,
gateway_ip=subnet.gateway_ip,
enable_dhcp=subnet.enable_dhcp)\
.AndReturn(subnet)
self.mox.ReplayAll()
form_data = form_data_subnet(subnet,
allocation_pools=[])
url = reverse('horizon:project:networks:editsubnet',
args=[subnet.network_id, subnet.id])
res = self.client.post(url, form_data)
redir_url = reverse('horizon:project:networks:detail',
args=[subnet.network_id])
self.assertRedirectsNoFollow(res, redir_url)
@test.create_stubs({api.quantum: ('subnet_modify',
'subnet_get',)})
def test_subnet_update_post(self):

View File

@ -14,7 +14,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from django.utils.translation import ugettext_lazy as _
from django.forms import ValidationError
from django.utils.translation import ugettext_lazy as _
from django.views.decorators.debug import sensitive_variables

View File

@ -38,8 +38,6 @@ exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,p
# E128 continuation line under-indented for visual indent
# F401 '<smth>' imported but unused
# F403 'from <smth> import *' used; unable to detect undefined names
# F811 redefinition of unused '<smth>' from line <line_#>
# F821 undefined name '<smth>'
# F841 local variable '<smth>' is assigned to but never used
# F999 syntax error in doctest
# H201 no 'except:' at least use 'except Exception:'
@ -50,4 +48,4 @@ exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,p
# H4xx docstrings
# H701 empty localization string
# H702 Formatting operation should be outside of localization method call
ignore = E121,E126,E127,E128,F403,F811,F821,F841,F999,H201,H302,H303,H304,H306,H4,H701,H702
ignore = E121,E126,E127,E128,F403,F841,F999,H201,H302,H303,H304,H306,H4,H701,H702