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,7 @@ def __init__(
5050 else :
5151 raise NotImplementedError
5252
53- def _get_callable (self , assembly_path , typename , function ) :
53+ def _get_callable (self , assembly_path : StrOrPath , typename : str , function : str ) -> "MonoMethod" :
5454 assembly_path = Path (assembly_path )
5555 assembly = self ._assemblies .get (assembly_path )
5656 if not assembly :
@@ -87,14 +87,14 @@ def shutdown(self) -> None:
8787
8888
8989class MethodDesc :
90- def __init__ (self , typename , function ):
90+ def __init__ (self , typename : str , function : str ):
9191 self ._desc = f"{ typename } :{ function } "
9292 self ._ptr = _MONO .mono_method_desc_new (
9393 self ._desc .encode ("utf8" ),
9494 1 , # include_namespace
9595 )
9696
97- def search (self , image ):
97+ def search (self , image : str ):
9898 return _MONO .mono_method_desc_search_in_image (self ._ptr , image )
9999
100100 def __del__ (self ):
0 commit comments