Skip to content

Commit

Permalink
Apply black
Browse files Browse the repository at this point in the history
Signed-off-by: Danila Fedorin <[email protected]>
  • Loading branch information
DanilaFe committed Oct 4, 2024
1 parent 20053e5 commit 04d782b
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions tools/chpl-language-server/src/chpl-language-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,10 @@ def eagerly_process_all_files(self, context: ContextContainer):
self.get_file_info("file://" + file, do_update=False)

def get_file_info(
self, uri: str, do_update: bool = False, context_id: Optional[str] = None
self,
uri: str,
do_update: bool = False,
context_id: Optional[str] = None,
) -> Tuple[FileInfo, List[Any]]:
"""
The language server maintains a FileInfo object per file. The FileInfo
Expand Down Expand Up @@ -1178,13 +1181,11 @@ def get_file_info(
else:
if context_id:
context = self.retrieve_context(context_id)
assert(context)
assert context
else:
context = self.get_context(uri)

file_info, errors = context.new_file_info(
uri, self.use_resolver
)
file_info, errors = context.new_file_info(uri, self.use_resolver)
self.file_infos[fi_key] = file_info

# Also make this the "default" context for this file in case we
Expand Down Expand Up @@ -2048,7 +2049,10 @@ async def prepare_call_hierarchy(

# Oddly, returning multiple here makes for no child nodes in the VSCode
# UI. Just take one signature for now.
return next(([ls.fn_to_call_hierarchy_item(sig, fi.context)] for sig in sigs), [])
return next(
([ls.fn_to_call_hierarchy_item(sig, fi.context)] for sig in sigs),
[],
)

@server.feature(CALL_HIERARCHY_INCOMING_CALLS)
async def call_hierarchy_incoming(
Expand Down

0 comments on commit 04d782b

Please sign in to comment.