Skip to content

Commit 4c48f62

Browse files
committed
docs: use ALLOW_EXTRA instead of Extra: object
This will render the schema in the reference docs better, as I didn't bother implementing any handling for `Extra: object`.
1 parent 0fc0e7a commit 4c48f62

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/taskgraph/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from dataclasses import dataclass
1010
from typing import Dict
1111

12-
from voluptuous import All, Any, Extra, Length, Optional, Required
12+
from voluptuous import ALLOW_EXTRA, All, Any, Extra, Length, Optional, Required
1313

1414
from .util import path
1515
from .util.caches import CACHES
@@ -101,8 +101,8 @@
101101
Length(min=1),
102102
),
103103
},
104-
Extra: object,
105-
}
104+
},
105+
extra=ALLOW_EXTRA,
106106
)
107107

108108

src/taskgraph/transforms/from_deps.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from copy import deepcopy
1515
from textwrap import dedent
1616

17-
from voluptuous import Any, Extra, Optional, Required
17+
from voluptuous import ALLOW_EXTRA, Any, Extra, Optional, Required
1818

1919
from taskgraph.transforms.base import TransformSequence
2020
from taskgraph.transforms.run import fetches_schema
@@ -109,8 +109,8 @@
109109
),
110110
): {str: [fetches_schema]},
111111
},
112-
Extra: object,
113112
},
113+
extra=ALLOW_EXTRA,
114114
)
115115

116116
transforms = TransformSequence()

src/taskgraph/transforms/matrix.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from copy import deepcopy
1111
from textwrap import dedent
1212

13-
from voluptuous import Extra, Optional, Required
13+
from voluptuous import ALLOW_EXTRA, Extra, Optional, Required
1414

1515
from taskgraph.transforms.base import TransformSequence
1616
from taskgraph.util.schema import Schema
@@ -58,8 +58,8 @@
5858
): [str],
5959
Extra: [str],
6060
},
61-
Extra: object,
6261
},
62+
extra=ALLOW_EXTRA,
6363
)
6464

6565
transforms = TransformSequence()

0 commit comments

Comments
 (0)