Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37847529
en ru br
ALT Linux repos
S:1.0.2-alt4

Group :: Development/Python3
RPM: python3-module-click-plugins

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: click-plugins-1.0.2-Click-7-changes-how-command-names-are-generated.patch
Download


From 39b115e77b4fb69d478d3d28b80224173545d5b8 Mon Sep 17 00:00:00 2001
From: Kevin Wurster <wursterk@gmail.com>
Date: Sat, 15 Sep 2018 19:45:11 -0400
Subject: [PATCH] Click 7 changes how command names are generated.
Click generates CLI command names from function names.  Previously a comman function like 'def command_function()' would generate a CLI command called 'command_function'.  As of the commit listed below the CLI commad is now called 'command-function'.
https://github.com/pallets/click/commit/5d1df0e042b2f8b0dee8f6dd9ce74edce331a950
---
 tests/test_plugins.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/test_plugins.py b/tests/test_plugins.py
index be899cb..3baf627 100644
--- a/tests/test_plugins.py
+++ b/tests/test_plugins.py
@@ -115,18 +115,18 @@ def test_group_chain(runner):
 
     # Same as above but the sub-group has plugins
     @with_plugins(plugins=iter_entry_points('_test_click_plugins.test_plugins'))
-    @good_cli.group()
+    @good_cli.group(name='sub-cli-plugins')
     def sub_cli_plugins():
         """Sub CLI with plugins."""
         pass
 
-    result = runner.invoke(good_cli, ['sub_cli_plugins'])
+    result = runner.invoke(good_cli, ['sub-cli-plugins'])
     assert result.exit_code is 0
     for ep in iter_entry_points('_test_click_plugins.test_plugins'):
         assert ep.name in result.output
 
     # Execute one of the sub-group's commands
-    result = runner.invoke(good_cli, ['sub_cli_plugins', 'cmd1', 'something'])
+    result = runner.invoke(good_cli, ['sub-cli-plugins', 'cmd1', 'something'])
     assert result.exit_code is 0
     assert result.output.strip() == 'passed'
 
-- 
2.21.0
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin