@@ -120,7 +120,9 @@ def info(self):
120120class DotnetCoreRuntime (DotnetCoreRuntimeBase ):
121121 def __init__ (self , runtime_config : Path , dotnet_root : Path , ** params : str ):
122122 super ().__init__ (dotnet_root )
123- self ._handle = _get_handle_for_runtime_config (self ._dll , self ._dotnet_root , runtime_config )
123+ self ._handle = _get_handle_for_runtime_config (
124+ self ._dll , self ._dotnet_root , runtime_config
125+ )
124126
125127 for key , value in params .items ():
126128 self [key ] = value
@@ -132,7 +134,9 @@ def __init__(self, runtime_config: Path, dotnet_root: Path, **params: str):
132134class DotnetCoreCommandRuntime (DotnetCoreRuntimeBase ):
133135 def __init__ (self , entry_dll : Path , dotnet_root : Path , ** params : str ):
134136 super ().__init__ (dotnet_root )
135- self ._handle = _get_handle_for_dotnet_command_line (self ._dll , self ._dotnet_root , entry_dll )
137+ self ._handle = _get_handle_for_dotnet_command_line (
138+ self ._dll , self ._dotnet_root , entry_dll
139+ )
136140
137141 for key , value in params .items ():
138142 self [key ] = value
@@ -141,7 +145,9 @@ def __init__(self, entry_dll: Path, dotnet_root: Path, **params: str):
141145 self ._version = "<undefined>"
142146
143147
144- def _get_handle_for_runtime_config (dll , dotnet_root : StrOrPath , runtime_config : StrOrPath ):
148+ def _get_handle_for_runtime_config (
149+ dll , dotnet_root : StrOrPath , runtime_config : StrOrPath
150+ ):
145151 params = ffi .new ("hostfxr_initialize_parameters*" )
146152 params .size = ffi .sizeof ("hostfxr_initialize_parameters" )
147153 # params.host_path = ffi.new("char_t[]", encode(sys.executable))
@@ -159,7 +165,9 @@ def _get_handle_for_runtime_config(dll, dotnet_root: StrOrPath, runtime_config:
159165 return handle_ptr [0 ]
160166
161167
162- def _get_handle_for_dotnet_command_line (dll , dotnet_root : StrOrPath , entry_dll : StrOrPath ):
168+ def _get_handle_for_dotnet_command_line (
169+ dll , dotnet_root : StrOrPath , entry_dll : StrOrPath
170+ ):
163171 params = ffi .new ("hostfxr_initialize_parameters*" )
164172 params .size = ffi .sizeof ("hostfxr_initialize_parameters" )
165173 params .host_path = ffi .NULL
@@ -172,9 +180,7 @@ def _get_handle_for_dotnet_command_line(dll, dotnet_root: StrOrPath, entry_dll:
172180 arg_ptr = ffi .new ("char_t[]" , encode (str (Path (entry_dll ))))
173181 args_ptr [0 ] = arg_ptr
174182 res = dll .hostfxr_initialize_for_dotnet_command_line (
175- 1 ,
176- args_ptr ,
177- params , handle_ptr
183+ 1 , args_ptr , params , handle_ptr
178184 )
179185
180186 check_result (res )
0 commit comments