Skip to content

Commit eb59a76

Browse files
committed
Fix flake8
1 parent f0bee22 commit eb59a76

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

ycmd/__main__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,6 @@ def Main():
194194
args.stderr,
195195
args.keep_logfiles )
196196
atexit.register( handlers.ServerCleanup )
197-
from bottle import TemplatePlugin
198-
handlers.app.uninstall(TemplatePlugin)
199197
handlers.app.install( WatchdogPlugin( args.idle_suicide_seconds,
200198
args.check_interval_seconds ) )
201199
handlers.app.install( HmacPlugin( hmac_secret ) )

ycmd/completers/language_server/language_server_completer.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2688,7 +2688,8 @@ def InitialHierarchy( self, request_data, args ):
26882688
responses.BuildGoToResponseFromLocation(
26892689
*_LspLocationToLocationAndDescription( request_data, location ) )
26902690
for location in preparation_item ]
2691-
preparation_item[ 0 ][ 'kind' ] = lsp.SYMBOL_KIND[ preparation_item[ 0 ][ 'kind' ] ]
2691+
kind_string = lsp.SYMBOL_KIND[ preparation_item[ 0 ][ 'kind' ] ]
2692+
preparation_item[ 0 ][ 'kind' ] = kind_string
26922693
return preparation_item
26932694

26942695

@@ -2704,7 +2705,8 @@ def Hierarchy( self, request_data, args ):
27042705
preparation_item = preparation_item[ name_and_kind_key ]
27052706
else:
27062707
del preparation_item[ 'locations' ]
2707-
preparation_item[ 'kind' ] = lsp.SYMBOL_KIND.index( preparation_item[ 'kind' ] )
2708+
kind_number = lsp.SYMBOL_KIND.index( preparation_item[ 'kind' ] )
2709+
preparation_item[ 'kind' ] = kind_number
27082710

27092711
if kind == 'call':
27102712
direction += 'Calls'
@@ -2720,7 +2722,8 @@ def Hierarchy( self, request_data, args ):
27202722
for item in result:
27212723
if kind == 'call':
27222724
name_and_kind_key = 'to' if direction == 'outgoing' else 'from'
2723-
item[ 'kind' ] = lsp.SYMBOL_KIND[ item[ name_and_kind_key ][ 'kind' ] ]
2725+
kind_string = lsp.SYMBOL_KIND[ item[ name_and_kind_key ][ 'kind' ] ]
2726+
item[ 'kind' ] = kind_string
27242727
item[ 'name' ] = item[ name_and_kind_key ][ 'name' ]
27252728
lsp_locations = [ {
27262729
'uri': item[ name_and_kind_key ][ 'uri' ],

0 commit comments

Comments
 (0)