Skip to content

Commit

Permalink
Fix change_config() and support 'allow' as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Sep 15, 2024
1 parent e210e0d commit fd05969
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/antsibull_core/pydantic.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ def _modify_config(

def set_extras(
models: type[p.BaseModel] | Collection[type[p.BaseModel]],
value: t.Literal["forbid", "ignore"],
value: t.Literal["allow", "ignore", "forbid"],
) -> None:
def change_config(model_config: p.ConfigDict) -> bool:
if model_config.get("extra") != value:
if model_config.get("extra") == value:
return False
model_config["extra"] = value
return True
Expand Down

0 comments on commit fd05969

Please sign in to comment.