Run flake8 and vint in azure
This commit is contained in:
parent
e82035f716
commit
fc802b61bd
10 changed files with 78 additions and 46 deletions
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
|
||||
" Boilerplate {{{
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
let s:save_cpo = &cpoptions
|
||||
set cpoptions&vim
|
||||
" }}}
|
||||
|
||||
|
||||
|
|
@ -111,6 +111,6 @@ function! vimspector#ListBreakpoints() abort
|
|||
endfunction
|
||||
|
||||
" Boilerplate {{{
|
||||
let &cpo=s:save_cpo
|
||||
let &cpoptions=s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" }}}
|
||||
|
|
|
|||
|
|
@ -15,11 +15,11 @@
|
|||
|
||||
|
||||
" Boilerplate {{{
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
let s:save_cpo = &cpoptions
|
||||
set cpoptions&vim
|
||||
" }}}
|
||||
|
||||
function vimspector#internal#balloon#BalloonExpr()
|
||||
function! vimspector#internal#balloon#BalloonExpr() abort
|
||||
" winnr + 1 because for *no good reason* winnr is 0 based here unlike
|
||||
" everywhere else
|
||||
" int() because for *no good reason* winnr is a string.
|
||||
|
|
@ -29,6 +29,6 @@ function vimspector#internal#balloon#BalloonExpr()
|
|||
endfunction
|
||||
|
||||
" Boilerplate {{{
|
||||
let &cpo=s:save_cpo
|
||||
let &cpoptions=s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" }}}
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
|
||||
" Boilerplate {{{
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
let s:save_cpo = &cpoptions
|
||||
set cpoptions&vim
|
||||
" }}}
|
||||
|
||||
function! s:_OnServerData( channel, data ) abort
|
||||
|
|
@ -26,15 +26,15 @@ EOF
|
|||
endfunction
|
||||
|
||||
function! s:_OnServerError( channel, data ) abort
|
||||
echom "Channel received error: " . a:data
|
||||
echom 'Channel received error: ' . a:data
|
||||
endfunction
|
||||
|
||||
function! s:_OnExit( channel, status ) abort
|
||||
echom "Channel exit with status " . a:status
|
||||
echom 'Channel exit with status ' . a:status
|
||||
endfunction
|
||||
|
||||
function! s:_OnClose( channel ) abort
|
||||
echom "Channel closed"
|
||||
echom 'Channel closed'
|
||||
" py3 _vimspector_session.OnChannelClosed()
|
||||
endfunction
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ endfunction
|
|||
function! vimspector#internal#channel#StartDebugSession( config ) abort
|
||||
|
||||
if exists( 's:ch' )
|
||||
echo "Channel is already running"
|
||||
echo 'Channel is already running'
|
||||
return v:none
|
||||
endif
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ function! vimspector#internal#channel#StartDebugSession( config ) abort
|
|||
\ }
|
||||
\ )
|
||||
|
||||
if ch_status( s:ch ) != 'open'
|
||||
if ch_status( s:ch ) !=# 'open'
|
||||
echom 'Unable to connect to debug adapter'
|
||||
return v:none
|
||||
endif
|
||||
|
|
@ -79,7 +79,7 @@ function! vimspector#internal#channel#StopDebugSession() abort
|
|||
return
|
||||
endif
|
||||
|
||||
if ch_status( s:ch ) == 'open'
|
||||
if ch_status( s:ch ) ==# 'open'
|
||||
call ch_close( s:ch )
|
||||
endif
|
||||
|
||||
|
|
@ -95,14 +95,14 @@ endfunction
|
|||
function! vimspector#internal#channel#ForceRead() abort
|
||||
if exists( 's:ch' )
|
||||
let data = ch_readraw( s:ch, { 'timeout': 1000 } )
|
||||
if data != ''
|
||||
if data !=# ''
|
||||
call s:_OnServerData( s:ch, data )
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Boilerplate {{{
|
||||
let &cpo=s:save_cpo
|
||||
let &cpoptions=s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" }}}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
|
||||
" Boilerplate {{{
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
let s:save_cpo = &cpoptions
|
||||
set cpoptions&vim
|
||||
" }}}
|
||||
|
||||
function! s:_OnServerData( channel, data ) abort
|
||||
|
|
@ -28,13 +28,13 @@ function! s:_OnServerError( channel, data ) abort
|
|||
endfunction
|
||||
|
||||
function! s:_OnExit( channel, status ) abort
|
||||
echom "Channel exit with status " . a:status
|
||||
echom 'Channel exit with status ' . a:status
|
||||
unlet s:job
|
||||
py3 _vimspector_session.OnServerExit( vim.eval( 'a:status' ) )
|
||||
endfunction
|
||||
|
||||
function! s:_OnClose( channel ) abort
|
||||
echom "Channel closed"
|
||||
echom 'Channel closed'
|
||||
endfunction
|
||||
|
||||
function! s:_Send( msg ) abort
|
||||
|
|
@ -43,14 +43,14 @@ function! s:_Send( msg ) abort
|
|||
return 0
|
||||
endif
|
||||
|
||||
if job_status( s:job ) != 'run'
|
||||
if job_status( s:job ) !=# 'run'
|
||||
echom "Can't send message: Job is not running"
|
||||
return 0
|
||||
endif
|
||||
|
||||
let ch = job_getchannel( s:job )
|
||||
if ch == 'channel fail'
|
||||
echom "Channel was closed unexpectedly!"
|
||||
if ch ==# 'channel fail'
|
||||
echom 'Channel was closed unexpectedly!'
|
||||
return 0
|
||||
endif
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ endfunction
|
|||
|
||||
function! vimspector#internal#job#StartDebugSession( config ) abort
|
||||
if exists( 's:job' )
|
||||
echom "Not starging: Job is already running"
|
||||
echom 'Not starging: Job is already running'
|
||||
return v:none
|
||||
endif
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ function! vimspector#internal#job#StartDebugSession( config ) abort
|
|||
|
||||
echom 'Started job, status is: ' . job_status( s:job )
|
||||
|
||||
if job_status( s:job ) != 'run'
|
||||
if job_status( s:job ) !=# 'run'
|
||||
echom 'Unable to start job, status is: ' . job_status( s:job )
|
||||
return v:none
|
||||
endif
|
||||
|
|
@ -95,8 +95,8 @@ function! vimspector#internal#job#StopDebugSession() abort
|
|||
return
|
||||
endif
|
||||
|
||||
if job_status( s:job ) == 'run'
|
||||
echom "Terminating job"
|
||||
if job_status( s:job ) ==# 'run'
|
||||
echom 'Terminating job'
|
||||
call job_stop( s:job, 'kill' )
|
||||
endif
|
||||
endfunction
|
||||
|
|
@ -108,13 +108,13 @@ endfunction
|
|||
function! vimspector#internal#job#ForceRead() abort
|
||||
if exists( 's:job' )
|
||||
let data = ch_readraw( job_getchannel( s:job ), { 'timeout': 1000 } )
|
||||
if data != ''
|
||||
if data !=# ''
|
||||
call s:_OnServerData( job_getchannel( s:job ), data )
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! vimspector#internal#job#StartCommandWithLog( cmd, category )
|
||||
function! vimspector#internal#job#StartCommandWithLog( cmd, category ) abort
|
||||
if ! exists( 's:commands' )
|
||||
let s:commands = {}
|
||||
endif
|
||||
|
|
@ -139,7 +139,7 @@ function! vimspector#internal#job#StartCommandWithLog( cmd, category )
|
|||
\ } ) )
|
||||
|
||||
if job_status( s:commands[ a:category ][ index ] ) !=# 'run'
|
||||
echom "Unable to start job for " . a:cmd
|
||||
echom 'Unable to start job for ' . a:cmd
|
||||
return v:none
|
||||
endif
|
||||
|
||||
|
|
@ -152,7 +152,7 @@ function! vimspector#internal#job#StartCommandWithLog( cmd, category )
|
|||
endfunction
|
||||
|
||||
|
||||
function! vimspector#internal#job#CleanUpCommand( category )
|
||||
function! vimspector#internal#job#CleanUpCommand( category ) abort
|
||||
if ! exists( 's:commands' )
|
||||
let s:commands = {}
|
||||
endif
|
||||
|
|
@ -168,6 +168,6 @@ function! vimspector#internal#job#CleanUpCommand( category )
|
|||
endfunction
|
||||
|
||||
" Boilerplate {{{
|
||||
let &cpo=s:save_cpo
|
||||
let &cpoptions=s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" }}}
|
||||
|
|
|
|||
|
|
@ -15,11 +15,11 @@
|
|||
|
||||
|
||||
" Boilerplate {{{
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
let s:save_cpo = &cpoptions
|
||||
set cpoptions&vim
|
||||
" }}}
|
||||
|
||||
function! vimspector#internal#state#Reset()
|
||||
function! vimspector#internal#state#Reset() abort
|
||||
py3 << EOF
|
||||
from vimspector import debug_session
|
||||
_vimspector_session = debug_session.DebugSession()
|
||||
|
|
@ -27,6 +27,6 @@ EOF
|
|||
endfunction
|
||||
|
||||
" Boilerplate {{{
|
||||
let &cpo=s:save_cpo
|
||||
let &cpoptions=s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" }}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue