Skip to content
Snippets Groups Projects
Commit 9b926a48 authored by Massimiliano Culpo's avatar Massimiliano Culpo
Browse files

qa : flake8 issues

parent 780a5736
Branches
Tags
No related merge requests found
......@@ -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)
\ No newline at end of file
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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment