Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
bstaletic committed May 14, 2024
1 parent 2a68752 commit 79d4f7b
Showing 1 changed file with 4 additions and 0 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

0 comments on commit 79d4f7b

Please sign in to comment.