Skip to content

Commit

Permalink
Update docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
bswck committed May 15, 2024
1 parent 9f30be0 commit be9ed78
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
3 changes: 0 additions & 3 deletions configzen/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,6 @@ def config_load(
to a TOML text file source. Keep in mind, however, that for binary formats
such as non-XML Plist you must specify its format type to binary, so in
that case just create `BinaryFileConfigSource("plist_file.plist")`.
context
The context to use during model validation.
See also [`model_validate`][pydantic.BaseModel.model_validate].
processor_factory
The state factory to use to parse the newly loaded configuration data.
Expand Down
1 change: 1 addition & 0 deletions configzen/formats/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""`configzen.formats`: Data formats supported natively by configzen."""

from __future__ import annotations

from . import std_json, std_plist, toml, yaml
Expand Down
18 changes: 2 additions & 16 deletions configzen/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,13 +304,9 @@ def _guess_data_format(self) -> DataFormat[Any, AnyStr]:

def load(self) -> Data:
"""
Load the configuration source file and return its contents as a dictionary.
Parameters
----------
data_format
The data format to use when loading the data.
Load the configuration source file.
Return its contents as a dictionary.
"""
return self.data_format.load(self._temp_stream_factory(self.read()))

Expand All @@ -319,12 +315,6 @@ async def load_async(self) -> Data:
Load the configuration source file asynchronously.
Return its contents as a dictionary.
Parameters
----------
data_format
The data format to use when loading the data.
"""
return self.data_format.load(self._temp_stream_factory(await self.read_async()))

Expand All @@ -336,8 +326,6 @@ def dump(self, data: Data) -> None:
----------
data
The data to dump to the configuration source.
data_format
The data format to use when dumping the data.
"""
temp_stream = self._temp_stream_factory()
Expand All @@ -355,8 +343,6 @@ async def dump_async(self, data: Data) -> int:
----------
data
The data to dump to the configuration source.
data_format
The data format to use when dumping the data.
"""
temp_stream = self._temp_stream_factory()
Expand Down

0 comments on commit be9ed78

Please sign in to comment.