dirigent-plugin 0.14.1__tar.gz → 0.15.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dirigent_plugin-0.14.1 → dirigent_plugin-0.15.0}/PKG-INFO +1 -1
- {dirigent_plugin-0.14.1 → dirigent_plugin-0.15.0}/pyproject.toml +1 -1
- {dirigent_plugin-0.14.1 → dirigent_plugin-0.15.0}/pyproject.toml.orig +1 -1
- {dirigent_plugin-0.14.1 → dirigent_plugin-0.15.0}/src/dirigent_plugin/__init__.py +2 -0
- {dirigent_plugin-0.14.1 → dirigent_plugin-0.15.0}/src/dirigent_plugin/markers.py +12 -0
- {dirigent_plugin-0.14.1 → dirigent_plugin-0.15.0}/LICENSE +0 -0
- {dirigent_plugin-0.14.1 → dirigent_plugin-0.15.0}/README.md +0 -0
- {dirigent_plugin-0.14.1 → dirigent_plugin-0.15.0}/src/dirigent_plugin/blocks.py +0 -0
- {dirigent_plugin-0.14.1 → dirigent_plugin-0.15.0}/src/dirigent_plugin/py.typed +0 -0
- {dirigent_plugin-0.14.1 → dirigent_plugin-0.15.0}/src/dirigent_plugin/transforms.py +0 -0
|
@@ -42,6 +42,7 @@ from dirigent_plugin.markers import (
|
|
|
42
42
|
ENTRY_POINT_GROUP,
|
|
43
43
|
PROJECT_NAME,
|
|
44
44
|
contribute,
|
|
45
|
+
examples,
|
|
45
46
|
extension,
|
|
46
47
|
extension_point,
|
|
47
48
|
formatters,
|
|
@@ -107,6 +108,7 @@ __all__ = [
|
|
|
107
108
|
"Transformer",
|
|
108
109
|
"classify_default",
|
|
109
110
|
"contribute",
|
|
111
|
+
"examples",
|
|
110
112
|
"extension",
|
|
111
113
|
"extension_point",
|
|
112
114
|
"formatters",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"""Plugin markers and the collecting extension points a dirigent plugin implements."""
|
|
2
2
|
|
|
3
|
+
from collections.abc import Sequence
|
|
4
|
+
from importlib.abc import Traversable
|
|
3
5
|
from typing import TYPE_CHECKING
|
|
4
6
|
|
|
5
7
|
from pluginkit import Extension, ExtensionPoint
|
|
@@ -28,3 +30,13 @@ def contribute() -> "Contribution":
|
|
|
28
30
|
def formatters() -> list[Formatter]:
|
|
29
31
|
"""Collect the formatters a plugin adds to ``dg format``, once at CLI startup."""
|
|
30
32
|
raise NotImplementedError("an extension point is a declaration; call it via PluginManager.caller(...)")
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@extension_point
|
|
36
|
+
def examples() -> Sequence[Traversable]:
|
|
37
|
+
"""Collect the directories a plugin's example shelves live in, once on first use.
|
|
38
|
+
|
|
39
|
+
A directory is walked recursively for documents; a ``pathlib.Path`` satisfies the
|
|
40
|
+
protocol, so a plugin may answer with either.
|
|
41
|
+
"""
|
|
42
|
+
raise NotImplementedError("an extension point is a declaration; call it via PluginManager.caller(...)")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|