Skip to content

Commit a012886

Browse files
committed
Fix small lints and drop obsolete parameters
1 parent a858d89 commit a012886

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

clr_loader/ffi/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def load_hostfxr(dotnet_root: str):
2828
raise RuntimeError(f"Could not find a suitable hostfxr library in {dotnet_root}")
2929

3030

31-
def load_mono(path: Optional[str] = None, gc: Optional[str] = None):
31+
def load_mono(path: Optional[str] = None):
3232
# Preload C++ standard library, Mono needs that and doesn't properly link against it
3333
if sys.platform.startswith("linux"):
3434
ffi.dlopen("stdc++", ffi.RTLD_GLOBAL)

clr_loader/mono.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def get_callable(self, assembly_path, typename, function):
3939
method, f"Could not find method {typename}.{function} in assembly"
4040
)
4141

42-
return MonoMethod(self._domain, method)
42+
return MonoMethod(method)
4343

4444

4545
class MethodDesc:
@@ -58,7 +58,7 @@ def __del__(self):
5858

5959

6060
class MonoMethod:
61-
def __init__(self, domain, ptr):
61+
def __init__(self, ptr):
6262
self._ptr = ptr
6363

6464
def __call__(self, ptr, size):

clr_loader/util/clr_error.py

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ def __init__(
1313
self.name = name
1414
self.message = message
1515
self.comment = comment
16+
super().__init__(self.message)
1617

1718
def __str__(self):
1819
if self.message:

clr_loader/util/find.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,5 @@ def find_libmono(sgen: bool = True) -> str:
6969

7070
if path is None:
7171
raise RuntimeError("Could not find libmono")
72-
72+
7373
return path

clr_loader/wrappers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
from os.path import basename
12
from typing import Any, Optional
23
from .ffi import ffi
3-
from os.path import basename
44

55
RuntimeImpl = Any
66

0 commit comments

Comments
 (0)