minor formatting and fixes

This commit is contained in:
Nick Sweeting
2024-09-05 04:39:46 -07:00
parent d50aed9185
commit ba6c1fd69b
5 changed files with 9 additions and 11 deletions

View File

@@ -1,9 +1,8 @@
__package__ = 'archivebox.plugantic'
from typing import Optional, List, Literal
from pathlib import Path
from pydantic import BaseModel, Field, ConfigDict, computed_field
from typing import List, Literal
from pydantic import ConfigDict
from .base_hook import BaseHook, HookType

View File

@@ -20,7 +20,7 @@ class BaseHook(BaseModel):
it modifies django.conf.settings in-place to add changes corresponding to its HookType.
e.g. for a HookType.CONFIG, the Hook.register() function places the hook in settings.CONFIG (and settings.HOOKS)
An example of an impure Hook would be a CHECK that modifies settings but also calls django.core.checks.register(check).
In practice any object that subclasses BaseHook and provides a .register() function can behave as a Hook.
setup_django() -> imports all settings.INSTALLED_APPS...
# django imports AppConfig, models, migrations, admins, etc. for all installed apps