mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-13 18:14:24 +02:00
Fix two small errors in abx-{readwise,spec-config} (#1635)
This commit is contained in:
@@ -15,11 +15,10 @@ from pydantic import Field
|
|||||||
|
|
||||||
from abx_spec_config.base_configset import BaseConfigSet
|
from abx_spec_config.base_configset import BaseConfigSet
|
||||||
|
|
||||||
SOURCES_DIR = abx.pm.hook.get_CONFIG().SOURCES_DIR
|
from archivebox.config import CONSTANTS
|
||||||
|
|
||||||
|
|
||||||
class ReadwiseConfig(BaseConfigSet):
|
class ReadwiseConfig(BaseConfigSet):
|
||||||
READWISE_DB_PATH: Path = Field(default=SOURCES_DIR / "readwise_reader_api.db")
|
READWISE_DB_PATH: Path = Field(default=CONSTANTS.SOURCES_DIR / "readwise_reader_api.db")
|
||||||
READWISE_READER_TOKENS: Dict[str, str] = Field(default=lambda: {}) # {<username>: <access_token>, ...}
|
READWISE_READER_TOKENS: Dict[str, str] = Field(default=lambda: {}) # {<username>: <access_token>, ...}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -33,7 +33,7 @@ class ConfigPluginSpec:
|
|||||||
@abx.hookspec
|
@abx.hookspec
|
||||||
@abx.hookimpl
|
@abx.hookimpl
|
||||||
def get_CONFIG() -> dict[abx.PluginId, 'BaseConfigSet | ConstantsDict']:
|
def get_CONFIG() -> dict[abx.PluginId, 'BaseConfigSet | ConstantsDict']:
|
||||||
from archivebox import CONSTANTS
|
from archivebox.config import CONSTANTS
|
||||||
"""Get the config for a single plugin -> {plugin_id: PluginConfigSet()}"""
|
"""Get the config for a single plugin -> {plugin_id: PluginConfigSet()}"""
|
||||||
return {
|
return {
|
||||||
'CONSTANTS': CONSTANTS,
|
'CONSTANTS': CONSTANTS,
|
||||||
|
Reference in New Issue
Block a user