Skip to content

Commit

Permalink
Another fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Sep 22, 2023
1 parent 5a3fe3c commit 58d90e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions wasmtime/_wasi.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from ctypes import *
from ctypes import c_char, POINTER, cast, c_char_p, c_int
import ctypes
from wasmtime import WasmtimeError
from . import _ffi as ffi
from ._config import setter_property
from typing import List, Iterable
from typing import List, Iterable, Union
from os import PathLike


def _encode_path(path: str | bytes | PathLike) -> bytes:
def _encode_path(path: Union[str, bytes, PathLike]) -> bytes:
if isinstance(path, (bytes, str)):
path2 = path
else:
Expand Down Expand Up @@ -60,7 +60,7 @@ def inherit_env(self) -> None:
ffi.wasi_config_inherit_env(self._ptr)

@setter_property
def stdin_file(self, path: str | bytes | PathLike) -> None:
def stdin_file(self, path: Union[str, bytes, PathLike]) -> None:
"""
Configures a file to be used as the stdin stream of this WASI
configuration.
Expand Down

0 comments on commit 58d90e2

Please sign in to comment.