From fac341f98fa1a792f5d61037544154df26833c22 Mon Sep 17 00:00:00 2001 From: Ajeet D'Souza <98ajeet@gmail.com> Date: Mon, 10 Feb 2025 02:42:35 +0530 Subject: [PATCH] pylint --- templates/xonsh.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/xonsh.txt b/templates/xonsh.txt index 2ca29a7..a95dded 100644 --- a/templates/xonsh.txt +++ b/templates/xonsh.txt @@ -43,13 +43,13 @@ def __zoxide_pwd() -> str: 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.""" if path is None: args = [] elif isinstance(path, bytes): args = [path.decode("utf-8")] - elif isinstance(path, str): + else: args = [path] _, exc, _ = xonsh.dirstack.cd(args) if exc is not None: