qa : flake8 issues
This commit is contained in:
parent
780a57367d
commit
9b926a480f
@ -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(
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user