44from typing import Any , Dict , Optional , Sequence
55
66from .ffi import ffi , load_mono
7- from .types import Runtime , RuntimeInfo
7+ from .types import Runtime , RuntimeInfo , StrOrPath
88from .util import optional_path_as_string , path_as_string
99
1010__all__ = ["Mono" ]
@@ -32,7 +32,7 @@ def __init__(
3232 ):
3333 self ._assemblies : Dict [Path , Any ] = {}
3434
35- self ._version = initialize (
35+ self ._version : str = initialize (
3636 config_file = optional_path_as_string (config_file ),
3737 debug = debug ,
3838 jit_options = jit_options ,
@@ -50,7 +50,9 @@ def __init__(
5050 else :
5151 raise NotImplementedError
5252
53- def _get_callable (self , assembly_path , typename , function ):
53+ def _get_callable (
54+ self , assembly_path : StrOrPath , typename : str , function : str
55+ ) -> "MonoMethod" :
5456 assembly_path = Path (assembly_path )
5557 assembly = self ._assemblies .get (assembly_path )
5658 if not assembly :
@@ -87,14 +89,14 @@ def shutdown(self) -> None:
8789
8890
8991class MethodDesc :
90- def __init__ (self , typename , function ):
92+ def __init__ (self , typename : str , function : str ):
9193 self ._desc = f"{ typename } :{ function } "
9294 self ._ptr = _MONO .mono_method_desc_new (
9395 self ._desc .encode ("utf8" ),
9496 1 , # include_namespace
9597 )
9698
97- def search (self , image ):
99+ def search (self , image : str ):
98100 return _MONO .mono_method_desc_search_in_image (self ._ptr , image )
99101
100102 def __del__ (self ):
0 commit comments