Skip to content

Commit 0fba670

Browse files
remove app_settings arg from ready hook (#200)
1 parent ccc3941 commit 0fba670

File tree

5 files changed

+8
-10
lines changed

5 files changed

+8
-10
lines changed

docs/plugins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ django-bird uses a plugin system based on [pluggy](https://pluggy.readthedocs.io
2020
```
2121
````
2222

23-
````{py:function} ready(app_settings: django_bird.conf.AppSettings) -> None
23+
````{py:function} ready() -> None
2424
:canonical: django_bird.plugins.hookspecs.ready
2525
2626
```{autodoc2-docstring} django_bird.plugins.hookspecs.ready

src/django_bird/apps.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@ class DjangoBirdAppConfig(AppConfig):
1616
@override
1717
def ready(self):
1818
from django_bird.components import components
19-
from django_bird.conf import app_settings
2019
from django_bird.plugins import pm
2120
from django_bird.staticfiles import asset_types
2221

2322
pm.hook.register_asset_types(register_type=asset_types.register_type)
2423
components.discover_components()
25-
for init_handler in pm.hook.ready(app_settings=app_settings):
24+
for init_handler in pm.hook.ready():
2625
init_handler()

src/django_bird/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def get_component_directory_names(self):
4444

4545

4646
@hookimpl
47-
def ready(app_settings: AppSettings):
47+
def ready():
4848
app_settings.autoconfigure()
4949

5050

src/django_bird/plugins/hookspecs.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from pluggy import HookspecMarker
99

1010
if TYPE_CHECKING:
11-
from django_bird.conf import AppSettings
1211
from django_bird.staticfiles import Asset
1312
from django_bird.staticfiles import AssetType
1413

@@ -39,12 +38,12 @@ def get_template_directories() -> list[Path]:
3938

4039

4140
@hookspec
42-
def ready(app_settings: AppSettings) -> None:
41+
def ready() -> None:
4342
"""Called when the django-bird application is ready.
4443
45-
This hook is called during Django's application ready phase,
46-
allowing plugins to perform necessary setup like configuring
47-
settings, registering features, or any other initialization tasks.
44+
This hook is called during Django's application ready phase, allowing plugins to perform
45+
necessary setup like configuring settings, registering features, or any other
46+
initialization tasks.
4847
"""
4948

5049

src/django_bird/plugins/manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
pm = pluggy.PluginManager("django_bird")
1010
pm.add_hookspecs(hookspecs)
1111

12-
pm.load_setuptools_entrypoints("django_bird")
12+
pm.load_setuptools_entrypoints("django-bird")
1313

1414
DEFAULT_PLUGINS: list[str] = [
1515
"django_bird.conf",

0 commit comments

Comments
 (0)