invoke: Update Context.cd() to accept a pathlib.Path or a string (#9823)

This commit is contained in:
Andy Freeland
2023-02-27 10:11:48 -08:00
committed by GitHub
parent 6b98f7307b
commit f53d0737f2

View File

@@ -1,3 +1,4 @@
import pathlib
from contextlib import AbstractContextManager
from .config import Config, DataProxy
@@ -13,7 +14,7 @@ class Context(DataProxy):
def prefix(self, command: str) -> AbstractContextManager[None]: ...
@property
def cwd(self) -> str: ...
def cd(self, path: str) -> AbstractContextManager[None]: ...
def cd(self, path: str | pathlib.Path) -> AbstractContextManager[None]: ...
class MockContext(Context):
def __init__(self, config: Config | None = ..., **kwargs) -> None: ...