Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
bstaletic committed May 17, 2024
1 parent 2a68752 commit 7e16c1f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 4 additions & 0 deletions python/ycm/hierarchy_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,19 @@ def ToLocation( self, subindex : int ):

MAX_HANDLES_PER_INDEX = 1000000


def handle_to_index( handle : int ):
return abs( handle ) // MAX_HANDLES_PER_INDEX


def handle_to_location_index( handle : int ):
return abs( handle ) % MAX_HANDLES_PER_INDEX


def make_handle( index : int, location_index : int ):
return index * MAX_HANDLES_PER_INDEX + location_index


class HierarchyTree:
def __init__( self ):
self._up_nodes : List[ HierarchyNode ] = []
Expand Down
9 changes: 6 additions & 3 deletions python/ycm/tests/command_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ def test_SendCommandRequest_BuildRange_NoVisualMarks( self, ycm, *args ):
'column_num': 12
}
}
}
},
False
)


Expand Down Expand Up @@ -135,7 +136,8 @@ def test_SendCommandRequest_BuildRange_VisualMarks( self, ycm, *args ):
'column_num': 9
}
}
}
},
False
)


Expand All @@ -153,7 +155,8 @@ def test_SendCommandRequest_IgnoreFileTypeOption( self, ycm, *args ):
'tab_size': 2,
'insert_spaces': True
},
}
},
False
)

with patch( 'ycm.youcompleteme.SendCommandRequest' ) as send_request:
Expand Down
2 changes: 1 addition & 1 deletion test/hover.test.vim
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ let s:cpp_lifetime = {
\ '',
\ 'Type: char',
\ 'Offset: 16 bytes',
\ 'Size: 1 byte (+7 bytes padding)',
\ 'Size: 1 byte (+7 bytes padding), alignment 1 byte',
\ 'nobody will live > 128 years',
\ '',
\ '// In PointInTime',
Expand Down

0 comments on commit 7e16c1f

Please sign in to comment.