qa : flake8 issues

This commit is contained in:
alalazo 2016-07-06 17:03:32 +02:00
parent 780a57367d
commit 9b926a480f
3 changed files with 4 additions and 4 deletions

View File

@ -77,7 +77,7 @@ import llnl.util.tty as tty
from llnl.util.tty.color import *
import spack
from spack.error import SpackError
from external import argparse
import argparse
# Command parsing
parser = argparse.ArgumentParser(

View File

@ -424,4 +424,4 @@ def test_get_item(self):
self.assertEqual(repr(b), 'Version(\'1_2-3\')')
self.assertEqual(str(b), '1_2-3')
# Raise TypeError on tuples
self.assertRaises(TypeError, b.__getitem__, 1, 2)
self.assertRaises(TypeError, b.__getitem__, 1, 2)

View File

@ -202,9 +202,9 @@ def __getitem__(self, idx):
# Currently len(self.separators) == len(self.version) - 1
extendend_separators = self.separators + ('',)
string_arg = []
for token, separator in zip(self.version, extendend_separators)[idx]:
for token, sep in zip(self.version, extendend_separators)[idx]:
string_arg.append(str(token))
string_arg.append(str(separator))
string_arg.append(str(sep))
string_arg.pop() # We don't need the last separator
string_arg = ''.join(string_arg)
return cls(string_arg)