Skip to content

Commit 52618ae

Browse files
maiyuxiaogebstaletic
authored andcommitted
remove usage of walrus operator
1 parent b5fe27b commit 52618ae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/ycm/hierarchy_tree.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ def __init__( self, data, distance : int ):
2828

2929

3030
def ToRootLocation( self, subindex : int ):
31-
if location := self._data.get( 'root_location' ):
31+
location = self._data.get( 'root_location' )
32+
if location:
3233
file = location[ 'filepath' ]
3334
line = location[ 'line_num' ]
3435
column = location[ 'column_num' ]

0 commit comments

Comments
 (0)