Skip to content

Commit

Permalink
remove usage of walrus operator
Browse files Browse the repository at this point in the history
  • Loading branch information
maiyuxiaoge authored and bstaletic committed Aug 6, 2024
1 parent b5fe27b commit 52618ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/ycm/hierarchy_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ def __init__( self, data, distance : int ):


def ToRootLocation( self, subindex : int ):
if location := self._data.get( 'root_location' ):
location = self._data.get( 'root_location' )
if location:
file = location[ 'filepath' ]
line = location[ 'line_num' ]
column = location[ 'column_num' ]
Expand Down

0 comments on commit 52618ae

Please sign in to comment.