Skip to content

Commit bbdc3da

Browse files
committed
Fix format
1 parent 8c123c6 commit bbdc3da

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

clr_loader/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def get_coreclr_command_line(
157157
*,
158158
entry_dll: StrOrPath,
159159
dotnet_root: Optional[StrOrPath] = None,
160-
properties: Optional[Dict[str, str]] = None
160+
properties: Optional[Dict[str, str]] = None,
161161
) -> Runtime:
162162
"""Get a CoreCLR (.NET Core) runtime instance
163163
The returned ``DotnetCoreRuntimeCommandLine`` also acts as a mapping of the config
@@ -178,7 +178,9 @@ def get_coreclr_command_line(
178178
if dotnet_root is None:
179179
dotnet_root = find_dotnet_root()
180180

181-
impl = DotnetCoreCommandRuntime(entry_dll=_maybe_path(entry_dll), dotnet_root=dotnet_root)
181+
impl = DotnetCoreCommandRuntime(
182+
entry_dll=_maybe_path(entry_dll), dotnet_root=dotnet_root
183+
)
182184
if properties:
183185
for key, value in properties.items():
184186
impl[key] = value

clr_loader/hostfxr.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ def info(self):
120120
class 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):
132134
class 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

Comments
 (0)