Skip to content

Commit 67492cb

Browse files
committed
refactor: sync with stdlib type stub change python/typeshed#14847
We are following the earlier signature, so it is no longer compatible and pyright errors out on that. Fix by simply narrowing the `path` argument's type. Signed-off-by: WANG Xuerui <[email protected]>
1 parent 81af3ae commit 67492cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ruyi/pluginhost/unsandboxed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def _load_stmt_helper(
148148
@staticmethod
149149
def source_to_code(
150150
data: "Buffer | str | ast.Module",
151-
path: "Buffer | str | os.PathLike[str]" = "<string>",
151+
path: "str | os.PathLike[str]" = "<string>",
152152
) -> CodeType:
153153
mod_ast: ast.Module
154154
if isinstance(data, ast.Module):

0 commit comments

Comments
 (0)