@@ -120,7 +120,9 @@ def info(self):
120
120
class DotnetCoreRuntime (DotnetCoreRuntimeBase ):
121
121
def __init__ (self , runtime_config : Path , dotnet_root : Path , ** params : str ):
122
122
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
+ )
124
126
125
127
for key , value in params .items ():
126
128
self [key ] = value
@@ -132,7 +134,9 @@ def __init__(self, runtime_config: Path, dotnet_root: Path, **params: str):
132
134
class DotnetCoreCommandRuntime (DotnetCoreRuntimeBase ):
133
135
def __init__ (self , entry_dll : Path , dotnet_root : Path , ** params : str ):
134
136
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
+ )
136
140
137
141
for key , value in params .items ():
138
142
self [key ] = value
@@ -141,7 +145,9 @@ def __init__(self, entry_dll: Path, dotnet_root: Path, **params: str):
141
145
self ._version = "<undefined>"
142
146
143
147
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
+ ):
145
151
params = ffi .new ("hostfxr_initialize_parameters*" )
146
152
params .size = ffi .sizeof ("hostfxr_initialize_parameters" )
147
153
# 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:
159
165
return handle_ptr [0 ]
160
166
161
167
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
+ ):
163
171
params = ffi .new ("hostfxr_initialize_parameters*" )
164
172
params .size = ffi .sizeof ("hostfxr_initialize_parameters" )
165
173
params .host_path = ffi .NULL
@@ -172,9 +180,7 @@ def _get_handle_for_dotnet_command_line(dll, dotnet_root: StrOrPath, entry_dll:
172
180
arg_ptr = ffi .new ("char_t[]" , encode (str (Path (entry_dll ))))
173
181
args_ptr [0 ] = arg_ptr
174
182
res = dll .hostfxr_initialize_for_dotnet_command_line (
175
- 1 ,
176
- args_ptr ,
177
- params , handle_ptr
183
+ 1 , args_ptr , params , handle_ptr
178
184
)
179
185
180
186
check_result (res )
0 commit comments