@@ -414,11 +414,12 @@ def get_placeholders(arg_list: list[str]):
414414 def get_documentation (self ):
415415 return self .doc_str
416416
417- def get_hover (self , long = False , drop_arg = - 1 ) -> tuple [str | None , str | None , bool ]:
418- return None , None , False
417+ def get_hover (self , long = False , drop_arg = - 1 ) -> tuple [str | None , str | None ]:
418+ return None , None
419419
420420 def get_hover_md (self , long = False , drop_arg = - 1 ) -> str :
421- return ""
421+ msg , docs = self .get_hover (long , drop_arg )
422+ return fortran_md (msg , docs )
422423
423424 def get_signature (self , drop_arg = - 1 ):
424425 return None , None , None
@@ -934,7 +935,7 @@ def get_hover(self, long=False, drop_arg=-1):
934935 keyword_list .append (f"{ self .get_desc ()} " )
935936 hover_array = [" " .join (keyword_list ) + sub_sig ]
936937 hover_array , docs = self .get_docs_full (hover_array , long , drop_arg )
937- return "\n " .join (hover_array ), " \n " .join (docs ), long
938+ return "\n " .join (hover_array ), " \n " .join (docs )
938939
939940 def get_hover_md (self , long = False , drop_arg = - 1 ):
940941 return fortran_md (* self .get_hover (long , drop_arg ))
@@ -969,7 +970,7 @@ def get_docs_full(
969970 for i , arg_obj in enumerate (self .arg_objs ):
970971 if arg_obj is None or i == drop_arg :
971972 continue
972- arg , doc_str , _ = arg_obj .get_hover ()
973+ arg , doc_str = arg_obj .get_hover ()
973974 hover_array .append (arg )
974975 if doc_str : # If doc_str is not None or ""
975976 if has_args :
@@ -1007,7 +1008,7 @@ def get_interface_array(
10071008 for i , arg_obj in enumerate (self .arg_objs ):
10081009 if arg_obj is None :
10091010 return None
1010- arg_doc , docs , _ = arg_obj .get_hover ()
1011+ arg_doc , docs = arg_obj .get_hover ()
10111012 if i == change_arg :
10121013 i0 = arg_doc .lower ().find (change_strings [0 ].lower ())
10131014 if i0 >= 0 :
@@ -1122,9 +1123,7 @@ def get_desc(self):
11221123 def is_callable (self ):
11231124 return False
11241125
1125- def get_hover (
1126- self , long : bool = False , drop_arg : int = - 1
1127- ) -> tuple [str , str , bool ]:
1126+ def get_hover (self , long : bool = False , drop_arg : int = - 1 ) -> tuple [str , str ]:
11281127 """Construct the hover message for a FUNCTION.
11291128 Two forms are produced here the `long` i.e. the normal for hover requests
11301129
@@ -1162,15 +1161,15 @@ def get_hover(
11621161 # Only append the return value if using long form
11631162 if self .result_obj and long :
11641163 # Parse the documentation from the result variable
1165- arg_doc , doc_str , _ = self .result_obj .get_hover ()
1164+ arg_doc , doc_str = self .result_obj .get_hover ()
11661165 if doc_str is not None :
11671166 docs .append (f"\n **Return:** \n `{ self .result_obj .name } `{ doc_str } " )
11681167 hover_array .append (arg_doc )
11691168 # intrinsic functions, where the return type is missing but can be inferred
11701169 elif self .result_type and long :
11711170 # prepend type to function signature
11721171 hover_array [0 ] = f"{ self .result_type } { hover_array [0 ]} "
1173- return "\n " .join (hover_array ), " \n " .join (docs ), long
1172+ return "\n " .join (hover_array ), " \n " .join (docs )
11741173
11751174 # TODO: fix this
11761175 def get_interface (self , name_replace = None , change_arg = - 1 , change_strings = None ):
@@ -1187,7 +1186,7 @@ def get_interface(self, name_replace=None, change_arg=-1, change_strings=None):
11871186 keyword_list , fun_sig , change_arg , change_strings
11881187 )
11891188 if self .result_obj is not None :
1190- arg_doc , docs , _ = self .result_obj .get_hover ()
1189+ arg_doc , docs = self .result_obj .get_hover ()
11911190 interface_array .append (f"{ arg_doc } :: { self .result_obj .name } " )
11921191 name = self .name
11931192 if name_replace is not None :
@@ -1696,7 +1695,7 @@ def get_snippet(self, name_replace=None, drop_arg=-1):
16961695 # Normal variable
16971696 return None , None
16981697
1699- def get_hover (self , long = False , drop_arg = - 1 ) -> tuple [str , str , bool ]:
1698+ def get_hover (self , long = False , drop_arg = - 1 ) -> tuple [str , str ]:
17001699 doc_str = self .get_documentation ()
17011700 # In associated blocks we need to fetch the desc and keywords of the
17021701 # linked object
@@ -1706,7 +1705,7 @@ def get_hover(self, long=False, drop_arg=-1) -> tuple[str, str, bool]:
17061705 hover_str += f" :: { self .name } "
17071706 if self .is_parameter () and self .param_val :
17081707 hover_str += f" = { self .param_val } "
1709- return hover_str , doc_str , True
1708+ return hover_str , doc_str
17101709
17111710 def get_hover_md (self , long = False , drop_arg = - 1 ):
17121711 return fortran_md (* self .get_hover (long , drop_arg ))
@@ -1845,17 +1844,14 @@ def get_documentation(self):
18451844 return self .link_obj .get_documentation ()
18461845 return self .doc_str
18471846
1848- def get_hover (self , long = False , drop_arg = - 1 ) -> tuple [str , str , bool ]:
1847+ def get_hover (self , long = False , drop_arg = - 1 ) -> tuple [str , str ]:
18491848 docs = self .get_documentation ()
1850- if not long :
1851- hover_str = ", " .join ([self .desc ] + get_keywords (self .keywords ))
1852- return hover_str , docs , True
18531849 # Long hover message
18541850 if self .link_obj is None :
18551851 sub_sig , _ = self .get_snippet ()
18561852 hover_str = f"{ self .get_desc ()} { sub_sig } "
18571853 else :
1858- link_msg , link_docs , _ = self .link_obj .get_hover (
1854+ link_msg , link_docs = self .link_obj .get_hover (
18591855 long = True , drop_arg = self .drop_arg
18601856 )
18611857 # Replace the name of the linked object with the name of this object
@@ -1874,7 +1870,7 @@ def get_hover(self, long=False, drop_arg=-1) -> tuple[str, str, bool]:
18741870 if docs is None :
18751871 docs = ""
18761872 docs += " \n " + link_docs
1877- return hover_str , docs , True
1873+ return hover_str , docs
18781874
18791875 def get_signature (self , drop_arg = - 1 ):
18801876 if self .link_obj is not None :
0 commit comments