Coverage for src/bunches/kinds.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.16.2, created at 2026-10-30 23:02 +0000

1"""Types and type aliases for the package. 

2 

3Contents: 

4 GenericDict: type alias for any mutable mapping with hashable keys. 

5 GenericList: type alias for any mutable sequence. 

6 SubsetReturns: type alias for the options of the `returns` argument of 

7 `subset` methods. 

8 

9""" 

10 

11from __future__ import annotations 

12 

13from collections.abc import Hashable, MutableMapping, MutableSequence 

14from typing import Any, Literal, TypeAlias 

15 

16""" Type Aliases """ 

17 

18GenericDict: TypeAlias = MutableMapping[Hashable, Any] 

19GenericList: TypeAlias = MutableSequence[Any] 

20SubsetReturns: TypeAlias = Literal['class', 'copy', 'simple']