File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ def pyls_lint(config, document):
3030 diags .append ({
3131 'source' : 'mccabe' ,
3232 'range' : {
33- 'start' : {'line' : graph .lineno , 'character' : graph .column },
34- 'end' : {'line' : graph .lineno , 'character' : len (document .lines [graph .lineno ])},
33+ 'start' : {'line' : graph .lineno - 1 , 'character' : graph .column },
34+ 'end' : {'line' : graph .lineno - 1 , 'character' : len (document .lines [graph .lineno ])},
3535 },
3636 'message' : 'Cyclomatic complexity too high: %s (threshold %s)' % (graph .complexity (), threshold ),
3737 'severity' : lsp .DiagnosticSeverity .Warning
Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ def test_mccabe(config):
2626 mod_import = [d for d in diags if d ['message' ] == msg ][0 ]
2727
2828 assert mod_import ['severity' ] == lsp .DiagnosticSeverity .Warning
29- assert mod_import ['range' ]['start' ] == {'line' : 1 , 'character' : 0 }
30- assert mod_import ['range' ]['end' ] == {'line' : 1 , 'character' : 6 }
29+ assert mod_import ['range' ]['start' ] == {'line' : 0 , 'character' : 0 }
30+ assert mod_import ['range' ]['end' ] == {'line' : 0 , 'character' : 6 }
3131 finally :
3232 config ._settings = old_settings
3333
You can’t perform that action at this time.
0 commit comments