#476 Make F401 a warning and E112 a syntax error
This commit is contained in:
parent
fcb7932d7d
commit
5972b97223
4 changed files with 55 additions and 5 deletions
|
@ -214,3 +214,33 @@ Execute(Disabling trailing blank line warnings should work):
|
|||
\ ale_linters#python#flake8#Handle(bufnr(''), [
|
||||
\ 'foo.py:6:1: W391 blank line at end of file',
|
||||
\ ])
|
||||
|
||||
Execute(F401 should be a warning):
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'lnum': 6,
|
||||
\ 'col': 1,
|
||||
\ 'code': 'F401',
|
||||
\ 'type': 'W',
|
||||
\ 'text': 'module imported but unused',
|
||||
\ },
|
||||
\ ],
|
||||
\ ale_linters#python#flake8#Handle(bufnr(''), [
|
||||
\ 'foo.py:6:1: F401 module imported but unused',
|
||||
\ ])
|
||||
|
||||
Execute(E112 should be a syntax error):
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'lnum': 6,
|
||||
\ 'col': 1,
|
||||
\ 'code': 'E112',
|
||||
\ 'type': 'E',
|
||||
\ 'text': 'expected an indented block',
|
||||
\ },
|
||||
\ ],
|
||||
\ ale_linters#python#flake8#Handle(bufnr(''), [
|
||||
\ 'foo.py:6:1: E112 expected an indented block',
|
||||
\ ])
|
||||
|
|
|
@ -137,3 +137,18 @@ Execute(Disabling trailing blank line warnings should work):
|
|||
\ ale_linters#python#pycodestyle#Handle(bufnr(''), [
|
||||
\ 'foo.py:6:1: W391 blank line at end of file',
|
||||
\ ])
|
||||
|
||||
Execute(E112 should be a syntax error):
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'lnum': 6,
|
||||
\ 'col': 1,
|
||||
\ 'code': 'E112',
|
||||
\ 'type': 'E',
|
||||
\ 'text': 'expected an indented block',
|
||||
\ },
|
||||
\ ],
|
||||
\ ale_linters#python#pycodestyle#Handle(bufnr(''), [
|
||||
\ 'foo.py:6:1: E112 expected an indented block',
|
||||
\ ])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue