forked from VimPlug/jedi
small fixes to the analysis.Error class.
This commit is contained in:
@@ -588,6 +588,8 @@ class Script(object):
|
||||
def analysis(self):
|
||||
statements = set(chain(*self._parser.module().used_names.values()))
|
||||
for stmt in statements:
|
||||
if stmt.start_pos[0] != 32:
|
||||
continue
|
||||
if isinstance(stmt, pr.Import):
|
||||
imports.strip_imports(self._evaluator, [stmt])
|
||||
else:
|
||||
|
||||
@@ -30,8 +30,11 @@ class Error(object):
|
||||
first = self.__class__.__name__[0]
|
||||
return first + str(CODES[self.name][0])
|
||||
|
||||
def description(self):
|
||||
return CODES[self.name][1]
|
||||
|
||||
def __str__(self):
|
||||
return '%s: %s' % (self.code, self.line)
|
||||
return '%s: %s:%s' % (self.code, self.line, self.description())
|
||||
|
||||
def __repr__(self):
|
||||
return '<%s %s: %s@%s,%s' % (self.__class__.__name__,
|
||||
|
||||
Reference in New Issue
Block a user