A key for a high-scoped parameter used by an item. For use as a hashable key in `reorder_items`. The combination of fields is meant to uniquely identify a particular "instance" of a param, potentially shared by multiple items in a scope.
| 201 | |
| 202 | @dataclasses.dataclass(frozen=True) |
| 203 | class ParamArgKey: |
| 204 | """A key for a high-scoped parameter used by an item. |
| 205 | |
| 206 | For use as a hashable key in `reorder_items`. The combination of fields |
| 207 | is meant to uniquely identify a particular "instance" of a param, |
| 208 | potentially shared by multiple items in a scope. |
| 209 | """ |
| 210 | |
| 211 | #: The param name. |
| 212 | argname: str |
| 213 | param_index: int |
| 214 | #: For scopes Package, Module, Class, the path to the file (directory in |
| 215 | #: Package's case) of the package/module/class where the item is defined. |
| 216 | scoped_item_path: Path | None |
| 217 | #: For Class scope, the class where the item is defined. |
| 218 | item_cls: type | None |
| 219 | |
| 220 | |
| 221 | _V = TypeVar("_V") |