Skip to content

Commit

Permalink
fix: SingleElementToList doesn't support list, docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ytausch committed Mar 13, 2024
1 parent 56c1d2a commit 4dcb96f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions conda_forge_tick/models/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ Undocumented.
Undocumented.

### `node_attrs`
Each file in this directory corresponds to a package in the conda-forge ecosystem and contains metadata about the
package. The exact structure of a JSON file is documented by the `NodeAttributes` Pydantic model defined in
[node_attributes.py](node_attributes.py).
One file per conda-forge package containing metadata about the package.
Pydantic Model: `NodeAttributes` in [node_attributes.py](node_attributes.py).

### `pr_info`
Undocumented.
Expand All @@ -58,7 +57,7 @@ Undocumented.
Undocumented.

### `versions`
Undocumented.
One file per conda-forge package containing upstream version update information about the package.

### `graph.json`
The JSON representation of a [networkx](https://networkx.org/) graph. The graph is a directed graph, where the nodes
Expand Down
2 changes: 1 addition & 1 deletion conda_forge_tick/models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def convert_to_list(value: T) -> list[T]:

SingleElementToList = Annotated[list[T], BeforeValidator(convert_to_list)]
"""
A generic list type that converts a single value to a list.
A generic list type that converts a single value to a list. Union with list[T] to allow multiple values.
"""


Expand Down
2 changes: 1 addition & 1 deletion conda_forge_tick/models/conda_forge_yml.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class VersionSource(StrEnum):

class BotVersionUpdates(StrictBaseModel):
random_fraction_to_keep: float = Field(0.0, ge=0.0, le=1.0)
sources: SingleElementToList[VersionSource] | None = None
sources: SingleElementToList[VersionSource] | list[VersionSource] | None = None
exclude: NoneIsEmptyList[str] | SingleElementToList[str] = []


Expand Down

0 comments on commit 4dcb96f

Please sign in to comment.