Skip to content

Commit f53d073

Browse files
authored
invoke: Update Context.cd() to accept a pathlib.Path or a string (#9823)
1 parent 6b98f73 commit f53d073

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

stubs/invoke/invoke/context.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import pathlib
12
from contextlib import AbstractContextManager
23

34
from .config import Config, DataProxy
@@ -13,7 +14,7 @@ class Context(DataProxy):
1314
def prefix(self, command: str) -> AbstractContextManager[None]: ...
1415
@property
1516
def cwd(self) -> str: ...
16-
def cd(self, path: str) -> AbstractContextManager[None]: ...
17+
def cd(self, path: str | pathlib.Path) -> AbstractContextManager[None]: ...
1718

1819
class MockContext(Context):
1920
def __init__(self, config: Config | None = ..., **kwargs) -> None: ...

0 commit comments

Comments
 (0)