Skip to content

Commit

Permalink
Fix flake8 and update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Oct 28, 2022
1 parent 67e2648 commit 1758555
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions qgis_plugin_manager/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."
),
)

Expand All @@ -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."
),
)

Expand Down
4 changes: 3 additions & 1 deletion qgis_plugin_manager/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 1758555

Please sign in to comment.