From 175855508bea6625742d414ec9f00c7f070217ab Mon Sep 17 00:00:00 2001 From: Etienne Trimaille Date: Fri, 28 Oct 2022 16:57:08 +0200 Subject: [PATCH] Fix flake8 and update changelog --- CHANGELOG.md | 8 ++++++++ qgis_plugin_manager/__main__.py | 11 ++++++----- qgis_plugin_manager/remote.py | 4 +++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 477bae9..5f1bf1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ ## Unreleased +### Added + +* Add new `--force` or `-f` to `install` and `upgrade` commands + +### Fixed + +* Fix QGIS version detection when showing the list of plugin + ## 1.3.2 - 2022-10-27 ### Fixed diff --git a/qgis_plugin_manager/__main__.py b/qgis_plugin_manager/__main__.py index aa178c6..376fac5 100755 --- a/qgis_plugin_manager/__main__.py +++ b/qgis_plugin_manager/__main__.py @@ -44,8 +44,8 @@ def main() -> int: # noqa: C901 "--force", action="store_true", help=( - "If specified, the upgrade will be forced for all plugins. Otherwise, it will be done only if the version " - "is different." + "If specified, the upgrade will be forced for all plugins. Otherwise, it will be done only if " + "the version is different." ), ) @@ -59,14 +59,15 @@ def main() -> int: # noqa: C901 install.add_argument( "plugin_name", help=( - "The plugin to install, suffix '==version' is optional. The plugin might require quotes if there " - "is a space in its name.")) + "The plugin to install, suffix '==version' is optional. The plugin might require quotes if " + "there is a space in its name.")) install.add_argument( "-f", "--force", action="store_true", help=( - "If specified, the install will be forced for the plugin, even if the version is already installed." + "If specified, the install will be forced for the plugin, even if the version is already " + "installed." ), ) diff --git a/qgis_plugin_manager/remote.py b/qgis_plugin_manager/remote.py index c071771..a1e1b47 100644 --- a/qgis_plugin_manager/remote.py +++ b/qgis_plugin_manager/remote.py @@ -336,7 +336,9 @@ def install( if current_version == actual: if not force: - print(f"\t{Level.Alert}Same version detected on the remote, skipping {plugin_name}{Level.End}") + print( + f"\t{Level.Alert}Same version detected on the remote, skipping {plugin_name}{Level.End}" + ) # Plugin is installed and correct version, it's exit code 0 return True