Modernize and update the API capabilities object.
Review Request #12608 — Created Sept. 19, 2022 and submitted
This small change updates the API capabilities object with modern docs
and type annotations.
Ran unit tests.
Summary | ID |
---|---|
f0425324df856474b3afa7c994e37574c2e074f4 |
Description | From | Last Updated |
---|---|---|
We should use Dict[str, object] for this, to be a bit more explicit. |
chipx86 | |
I know it was this way before, but we probably don't need to capitalize capabilities. |
chipx86 | |
Missing a trailing period. |
chipx86 | |
This won't permit nested dictionaries or bools. It only allows a flat dictionary of string keys and values. Recursive dicts … |
chipx86 | |
Missing trailing comma. |
chipx86 | |
'typing.Union' imported but unused Column: 1 Error code: F401 |
reviewbot |
- Commits:
-
Summary ID 3162749e8d156c1edd1399ca16248d9b9396ee12 7b3eb0e0157d5663950d2ad432727f6bcdae28e3
Checks run (2 succeeded)
-
-
-
This won't permit nested dictionaries or bools. It only allows a flat dictionary of string keys and values.
Recursive dicts are a problem and our capabilities don't have a specific nesting level for values. So we have to be generic with
Dict[str, object]
.(
object
instead ofAny
, as the former ensures consistent type safety when reassigning values and the latter says "screw type safety."). -
- Commits:
-
Summary ID 7b3eb0e0157d5663950d2ad432727f6bcdae28e3 ec83d7d828062acff42d24220424a88036f15cab