11from abc import ABCMeta , abstractmethod
2+ from collections .abc import Callable
23from dataclasses import dataclass , field
34from os import PathLike
45from typing import Any
5- from collections .abc import Callable
66
77__all__ = ["StrOrPath" ]
88
@@ -70,7 +70,7 @@ def __repr__(self) -> str:
7070
7171class Assembly :
7272 def __init__ (self , runtime : "Runtime" , path : StrOrPath ):
73- self ._runtime : " Runtime" = runtime
73+ self ._runtime : Runtime = runtime
7474 self ._path : StrOrPath = path
7575
7676 def get_function (self , name : str , func : str | None = None ) -> ClrFunction :
@@ -108,7 +108,6 @@ class Runtime(metaclass=ABCMeta):
108108 @abstractmethod
109109 def info (self ) -> RuntimeInfo :
110110 """Get configuration and version information"""
111- pass
112111
113112 def get_assembly (self , assembly_path : StrOrPath ) -> Assembly :
114113 """Get an assembly wrapper
@@ -124,15 +123,13 @@ def _get_callable(
124123 self , assembly_path : StrOrPath , typename : str , function : str
125124 ) -> Callable [[Any , int ], Any ]:
126125 """Private function to retrieve a low-level callable object"""
127- pass
128126
129127 @abstractmethod
130128 def shutdown (self ) -> None :
131129 """Shut down the runtime as much as possible
132130
133131 Implementations should still be able to "reinitialize", thus the final
134132 cleanup will usually happen in an ``atexit`` handler."""
135- pass
136133
137134 def __del__ (self ) -> None :
138135 self .shutdown ()
0 commit comments