Skip to content

Commit f5eba31

Browse files
authored
Update Loader docs (#3352)
1 parent 329db63 commit f5eba31

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

docs/changelog/3352.doc.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update Loader docs - by :user:ziima

docs/plugins_api.rst

+3
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ config
6363
.. autoclass:: tox.config.loader.api.Loader
6464
:members:
6565

66+
.. autoclass:: tox.config.loader.memory.MemoryLoader
67+
:members:
68+
6669
.. autoclass:: tox.config.loader.convert.Convert
6770
:members:
6871

src/tox/config/loader/api.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ def copy(self) -> ConfigLoadArgs:
7777

7878

7979
class Loader(Convert[T]):
80-
"""Loader loads a configuration value and converts it."""
80+
"""Loader loads configuration values and converts it.
81+
82+
:param overrides: A list of overrides to be applied.
83+
"""
8184

8285
def __init__(self, section: Section, overrides: list[Override]) -> None:
8386
self._section = section
@@ -88,6 +91,7 @@ def __init__(self, section: Section, overrides: list[Override]) -> None:
8891

8992
@property
9093
def section(self) -> Section:
94+
"""Return the section of the configuration from where the values are extracted."""
9195
return self._section
9296

9397
@abstractmethod

src/tox/config/loader/memory.py

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515

1616
class MemoryLoader(Loader[Any]):
17+
"""Loads configuration directly from data in memory."""
18+
1719
def __init__(self, **kwargs: Any) -> None:
1820
super().__init__(Section(prefix="<memory>", name=str(id(self))), [])
1921
self.raw: dict[str, Any] = {**kwargs}

0 commit comments

Comments
 (0)