1"""miscellaneous utilities

2

3- `stable_hash` for hashing that is stable across runs

4- `muutils.misc.sequence` for sequence manipulation, applying mappings, and string-like operations on lists

5- `muutils.misc.string` for sanitizing things for filenames, adjusting docstrings, and converting dicts to filenames

6- `muutils.misc.numerical` for turning numbers into nice strings and back

7- `muutils.misc.freezing` for freezing things

8- `muutils.misc.classes` for some weird class utilities

9"""

10

11 from muutils.misc.hashing import stable_hash

12 from muutils.misc.sequence import (

13 WhenMissing,

14 empty_sequence_if_attr_false,

15 flatten,

16 list_split,

17 list_join,

18 apply_mapping,

19 apply_mapping_chain,

20)

21 from muutils.misc.string import (

22 sanitize_name,

23 sanitize_fname,

24 sanitize_identifier,

25 dict_to_filename,

26 dynamic_docstring,

27)

28 from muutils.misc.numerical import (

29 shorten_numerical_to_str,

30 str_to_numeric,

31 _SHORTEN_MAP,

32)

33 from muutils.misc.freezing import (

34 FrozenDict,

35 FrozenList,

36 freeze,

37)

38 from muutils.misc.classes import (

39 is_abstract,

40 get_all_subclasses,

41 isinstance_by_type_name,

42 IsDataclass,

43 get_hashable_eq_attrs,

44 dataclass_set_equals,

45)

46

47

48__all__ = [

49 # submodules

50 "classes",

51 "freezing",

52 "hashing",

53 "numerical",

54 "sequence",

55 "string",

56 # imports

57 "stable_hash",

58 "WhenMissing",

59 "empty_sequence_if_attr_false",

60 "flatten",

61 "list_split",

62 "list_join",

63 "apply_mapping",

64 "apply_mapping_chain",

65 "sanitize_name",

66 "sanitize_fname",

67 "sanitize_identifier",

68 "dict_to_filename",

69 "dynamic_docstring",

70 "shorten_numerical_to_str",

71 "str_to_numeric",

72 "_SHORTEN_MAP",

73 "FrozenDict",

74 "FrozenList",

75 "freeze",

76 "is_abstract",

77 "get_all_subclasses",

78 "isinstance_by_type_name",

79 "IsDataclass",

80 "get_hashable_eq_attrs",

81 "dataclass_set_equals",

82]