8000 Fix erros due to pylama Erro class changes · python-mode/python-mode@d89385a · GitHub
[go: up one dir, main page]

Skip to content

Commit d89385a

Browse files
committed
Fix erros due to pylama Erro class changes
1 parent 74a7c7b commit d89385a

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

pymode/lint.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,16 @@ def __sort(e):
8484
env.debug("Find sorting: ", sort_rules)
8585
errors = sorted(errors, key=__sort)
8686

87+
errors_list = []
8788
for e in errors:
88-
e._info['bufnr'] = env.curbuf.number
89-
if e._info['col'] is None:
90-
e._info['col'] = 1
91-
92-
env.run('g:PymodeLocList.current().extend', [e._info for e in errors])
89+
if e.col is None:
90+
e.col = 1
91+
err_dict = e.to_dict()
92+
err_dict['bufnr'] = env.curbuf.number
93+
err_dict['type'] = e.etype
94+
err_dict['text'] = e.message
95+
errors_list.append(err_dict)
96+
97+
env.run('g:PymodeLocList.current().extend', errors_list)
9398

9499
# pylama:ignore=W0212,E1103

0 commit comments

Comments
 (0)
0