diff options
| author | Gael Pasgrimaud <gael@gawel.org> | 2014-04-16 22:23:10 +0200 |
|---|---|---|
| committer | Gael Pasgrimaud <gael@gawel.org> | 2014-04-16 22:23:10 +0200 |
| commit | d2471e042c5b33100bb742247b7ef44c1ff9ea02 (patch) | |
| tree | c211d5ab50609fd18006b1b51ae8ab4e1f02a668 /webtest/forms.py | |
| parent | 6a0435bb75ca02f3dac157f06b49b757aede04d9 (diff) | |
| download | webtest-d2471e042c5b33100bb742247b7ef44c1ff9ea02.tar.gz | |
pep8 everywhere
Diffstat (limited to 'webtest/forms.py')
| -rw-r--r-- | webtest/forms.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/webtest/forms.py b/webtest/forms.py index a6df599..c9c7ee0 100644 --- a/webtest/forms.py +++ b/webtest/forms.py @@ -141,8 +141,7 @@ class Select(Field): else: raise ValueError( "Option %r not found (from %s)" - % (value, ', '.join( - [repr(o) for o, c, t in self.options]))) + % (value, ', '.join([repr(o) for o, c, t in self.options]))) def value__get(self): if self._forced_value is not NoValue: @@ -476,9 +475,10 @@ class Form(object): if tag == 'select': for option in node('option'): - field.options.append((option.attrs.get('value', option.text), - 'selected' in option.attrs, - option.text)) + field.options.append( + (option.attrs.get('value', option.text), + 'selected' in option.attrs, + option.text)) self.field_order = field_order self.fields = fields @@ -646,7 +646,8 @@ class Form(object): if submit_name is not None and name == submit_name: if index is not None and current_index == index: submit.append((name, field.value_if_submitted())) - if submit_value is not None and field.value_if_submitted() == submit_value: + if submit_value is not None and \ + field.value_if_submitted() == submit_value: submit.append((name, field.value_if_submitted())) current_index += 1 else: |
