From 72d226ba7d10c84dfede6d443d5ca3e05d9ee05f Mon Sep 17 00:00:00 2001 From: Abeautifulsnow <93829038@qq.com> Date: Tue, 29 Aug 2023 15:34:15 +0800 Subject: [PATCH] update --- README.md | 6 ++++-- pkgu.py | 9 ++++++--- pyproject.toml | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6636c22..0ffceb5 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ # pkgu Find the out-dated packages installed by the Pip tool and update them. Inspired by 👉[depu(Go)](https://github.com/kevwan/depu). -However, `pkgu` supports full and partial updates, which is more convenient and flexible. +However, `pkgu` supports full and partial updates, which is more convenient and flexible. It also supports cross-platform(Windows, linux, macos). + +👉 However, only python3.10 and above are available now. ## Usage @@ -21,7 +23,7 @@ and then, run `pkgu.py` script. python3 pkgu.py ``` -- Use it through pip +- Use it through pip - ***Highly Recommended*** ```bash pip3 install pkgu diff --git a/pkgu.py b/pkgu.py index 7915e33..24621de 100644 --- a/pkgu.py +++ b/pkgu.py @@ -377,7 +377,9 @@ def base_option_single( ) -> str: questions = [self.single(name, message=title, choices=options)] answers = IQ_Prompt(questions) - return answers.get(name) + + if answers: + return answers.get(name) def ifUpgradeModules(self) -> str: name = "single" @@ -400,9 +402,10 @@ def updateOneOfPackages( options = [f"{package[0]}@{package[1]}=>{package[2]}" for package in packages] _name = "multiple" terminal_package_option = [self.mutiple(_name, message=title, choices=options)] - answers = IQ_Prompt(terminal_package_option) - return answers.get(_name) + + if answers: + return answers.get(_name) class UserOptions(BaseOptions): diff --git a/pyproject.toml b/pyproject.toml index d06e4b1..5b24d49 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pkgu" -version = "0.0.24" +version = "0.0.25" description = "Find the out-dated packages installed by the pip tool and update them." authors = ["Abeautifulsnow "]