Skip to content

Commit f7af2c1

Browse files
committed
better docs
1 parent 9b2edd9 commit f7af2c1

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

docs/docs/api.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
# API documentation
22

3+
## Changelogs
34
::: pum.changelog.Changelog
45
::: pum.changelog.list_changelogs
56
::: pum.changelog.last_version
7+
8+
## MigrationParameterDefinition
69
::: pum.migration_parameter_definition.MigrationParameterDefintion
10+
11+
## PumConfig
712
::: pum.config.PumConfig
13+
14+
## SchemaMigrations
815
::: pum.schema_migrations.SchemaMigrations
16+
17+
## Upgrader
918
::: pum.upgrader.Upgrader

pum/changelog.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ def last_version(
3131
The changelogs are sorted by version.
3232
If after_current_version is True, only the changelogs that are after the current version will be returned.
3333
If after_current_version is False, all changelogs will be returned.
34+
35+
Args:
36+
config (PumConfig): The configuration object.
37+
dir (str | Path): The directory where the changelogs are located.
38+
after_version (str | None): The version to start from.
39+
before_version (str | None): The version to end at.
3440
"""
3541
changelogs = list_changelogs(config, dir, after_version, before_version)
3642
if not changelogs:
@@ -55,6 +61,12 @@ def list_changelogs(
5561
The changelogs are sorted by version.
5662
If after_current_version is True, only the changelogs that are after the current version will be returned.
5763
If after_current_version is False, all changelogs will be returned.
64+
65+
Args:
66+
config (PumConfig): The configuration object.
67+
dir (str | Path): The directory where the changelogs are located.
68+
after_version (str | None): The version to start from.
69+
before_version (str | None): The version to end at.
5870
"""
5971
path = Path(dir)
6072
if not path.is_dir():

0 commit comments

Comments
 (0)