click-default-group>=1.2.3 (#2173)

* click-default-group>=1.2.3

Now available as a wheel:
- https://github.com/click-contrib/click-default-group/issues/21

* Fix for blacken-docs
pull/2166/head
Simon Willison 2023-09-05 19:50:09 -07:00 zatwierdzone przez GitHub
rodzic 31d5c4ec05
commit 05707aa16b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 7 dodań i 2 usunięć

Wyświetl plik

@ -343,6 +343,7 @@ To define additional hooks, add a file to the plugin called ``datasette_your_plu
hookspec = HookspecMarker("datasette")
@hookspec
def name_of_your_hook_goes_here(datasette):
"Description of your hook."
@ -366,10 +367,13 @@ Within your plugin code you can trigger the hook using this pattern:
from datasette.plugins import pm
for plugin_return_value in pm.hook.name_of_your_hook_goes_here(
for (
plugin_return_value
) in pm.hook.name_of_your_hook_goes_here(
datasette=datasette
):
# Do something with plugin_return_value
pass
Other plugins will then be able to register their own implementations of your hook using this syntax:
@ -377,6 +381,7 @@ Other plugins will then be able to register their own implementations of your ho
from datasette import hookimpl
@hookimpl
def name_of_your_hook_goes_here(datasette):
return "Response from this plugin hook"

Wyświetl plik

@ -44,7 +44,7 @@ setup(
install_requires=[
"asgiref>=3.2.10",
"click>=7.1.1",
"click-default-group-wheel>=1.2.2",
"click-default-group>=1.2.3",
"Jinja2>=2.10.3",
"hupper>=1.9",
"httpx>=0.20",