Type definitions
Type definitions used in lintkit.
Note
This module is mostly used internally, unlikely to be directly useful for linter creators.
lintkit.type_definitions.GetItem ¶
Bases: Protocol
Protocol used to type objects with __getitem__ and __contains__.
lintkit.type_definitions.GetItem.__getitem__ ¶
Signature of __getitem__ method.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key | Hashable | Key to get the value for (must implement | required |
Returns:
| Type | Description |
|---|---|
Any | Value for the key. |
lintkit.type_definitions.GetItem.__contains__ ¶
Signature of __contains__ method.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key | Hashable | Key to check for (must implement | required |
Returns:
| Type | Description |
|---|---|
bool | True if the key is in the object, False otherwise. |