pylint
This commit is contained in:
parent
b86e845d3a
commit
fac341f98f
|
|
@ -43,13 +43,13 @@ def __zoxide_pwd() -> str:
|
||||||
return pwd
|
return pwd
|
||||||
|
|
||||||
|
|
||||||
def __zoxide_cd(path: typing.Optional[typing.AnyStr] = None) -> None:
|
def __zoxide_cd(path: str | bytes | None = None) -> None:
|
||||||
"""cd + custom logic based on the value of _ZO_ECHO."""
|
"""cd + custom logic based on the value of _ZO_ECHO."""
|
||||||
if path is None:
|
if path is None:
|
||||||
args = []
|
args = []
|
||||||
elif isinstance(path, bytes):
|
elif isinstance(path, bytes):
|
||||||
args = [path.decode("utf-8")]
|
args = [path.decode("utf-8")]
|
||||||
elif isinstance(path, str):
|
else:
|
||||||
args = [path]
|
args = [path]
|
||||||
_, exc, _ = xonsh.dirstack.cd(args)
|
_, exc, _ = xonsh.dirstack.cd(args)
|
||||||
if exc is not None:
|
if exc is not None:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue