summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2024-01-17 16:46:32 +0800
committer简律纯 <i@jyunko.cn>2024-01-17 16:46:32 +0800
commitf9527f433eb2c1dba8c527098efb085688df8a0f (patch)
tree840c45cb25d34559201615f9e75ac29839710def
parentd60e2193cc829148eba244f241b03b0462b3ba1e (diff)
downloadipm-f9527f433eb2c1dba8c527098efb085688df8a0f.tar.gz
ipm-f9527f433eb2c1dba8c527098efb085688df8a0f.zip
refactor(api): Remove unnecessary else after guard condition (remove-unnecessary-else)
-rw-r--r--src/ipm/api.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ipm/api.py b/src/ipm/api.py
index 30f7040..3f2f847 100644
--- a/src/ipm/api.py
+++ b/src/ipm/api.py
@@ -26,7 +26,7 @@ def install(uri: str, index: str = "", echo: bool = False) -> None:
info("正在初始化 IPM 环境...", echo)
HOME.mkdir(parents=True, exist_ok=True)
- index = index if index else INDEX
+ index = index or INDEX
if os.path.isabs(uri):
info(f"检定给定的 URI 地址[{uri}]为本地路径.", echo)