Skip to content

Commit 395ba49

Browse files
committed
fix lints and tests
1 parent 6ff0b2b commit 395ba49

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/ffi.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ const DENO_PYTHON_PATH = Deno.env.get("DENO_PYTHON_PATH");
99
if (DENO_PYTHON_PATH) {
1010
searchPath.push(DENO_PYTHON_PATH);
1111
} else {
12-
if (Deno.build.os === "windows" || Deno.build.os === "linux" || Deno.build.os === "windows_nt") {
12+
if (
13+
Deno.build.os === "windows" || Deno.build.os === "linux" ||
14+
// @ts-ignore: users reported that `windows_nt` exists at runtime
15+
Deno.build.os === "windows_nt"
16+
) {
1317
searchPath.push(
1418
...SUPPORTED_VERSIONS.map(([major, minor]) =>
1519
`${Deno.build.os === "linux" ? "lib" : ""}python${major}${

src/python.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ export class PyObject {
824824

825825
/** Python-related error. */
826826
export class PythonError extends Error {
827-
name = "PythonError";
827+
override name = "PythonError";
828828

829829
constructor(
830830
public type: PyObject,
@@ -947,6 +947,7 @@ export class Python {
947947
.handle,
948948
);
949949
if (module === null) {
950+
maybeThrowError();
950951
throw new EvalError("Failed to run python module");
951952
}
952953
return new PyObject(module)?.proxy;

0 commit comments

Comments
 (0)