ominfra 0.0.0.dev130__py3-none-any.whl → 0.0.0.dev132__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -82,10 +82,10 @@ if sys.version_info < (3, 8):
82
82
  ########################################
83
83
 
84
84
 
85
- # ../../../../omlish/lite/cached.py
85
+ # ../../../omlish/lite/cached.py
86
86
  T = ta.TypeVar('T')
87
87
 
88
- # ../../../../omlish/lite/check.py
88
+ # ../../../omlish/lite/check.py
89
89
  SizedT = ta.TypeVar('SizedT', bound=ta.Sized)
90
90
 
91
91
 
@@ -33,10 +33,10 @@ if sys.version_info < (3, 8):
33
33
  ########################################
34
34
 
35
35
 
36
- # ../../../../omlish/lite/cached.py
36
+ # ../../../omlish/lite/cached.py
37
37
  T = ta.TypeVar('T')
38
38
 
39
- # ../base.py
39
+ # base.py
40
40
  ConcernT = ta.TypeVar('ConcernT')
41
41
  ConfigT = ta.TypeVar('ConfigT')
42
42
  SiteConcernT = ta.TypeVar('SiteConcernT', bound='SiteConcern')
@@ -41,10 +41,10 @@ if sys.version_info < (3, 8):
41
41
  ########################################
42
42
 
43
43
 
44
- # ../../../omlish/lite/cached.py
44
+ # ../../omlish/lite/cached.py
45
45
  T = ta.TypeVar('T')
46
46
 
47
- # ../../../omlish/lite/check.py
47
+ # ../../omlish/lite/check.py
48
48
  SizedT = ta.TypeVar('SizedT', bound=ta.Sized)
49
49
 
50
50
 
@@ -51,24 +51,24 @@ if sys.version_info < (3, 8):
51
51
  ########################################
52
52
 
53
53
 
54
- # ../../../../../omdev/toml/parser.py
54
+ # ../../../../omdev/toml/parser.py
55
55
  TomlParseFloat = ta.Callable[[str], ta.Any]
56
56
  TomlKey = ta.Tuple[str, ...]
57
57
  TomlPos = int # ta.TypeAlias
58
58
 
59
- # ../../../../../omlish/lite/cached.py
59
+ # ../../../../omlish/lite/cached.py
60
60
  T = ta.TypeVar('T')
61
61
 
62
- # ../../../../../omlish/lite/check.py
62
+ # ../../../../omlish/lite/check.py
63
63
  SizedT = ta.TypeVar('SizedT', bound=ta.Sized)
64
64
 
65
- # ../../../../../omlish/lite/contextmanagers.py
65
+ # ../../../../omlish/lite/contextmanagers.py
66
66
  ExitStackedT = ta.TypeVar('ExitStackedT', bound='ExitStacked')
67
67
 
68
- # ../../../../configs.py
68
+ # ../../../configs.py
69
69
  ConfigMapping = ta.Mapping[str, ta.Any]
70
70
 
71
- # ../../../../threadworkers.py
71
+ # ../../../threadworkers.py
72
72
  ThreadWorkerT = ta.TypeVar('ThreadWorkerT', bound='ThreadWorker')
73
73
 
74
74
 
@@ -1627,6 +1627,14 @@ class ExitStacked:
1627
1627
  ##
1628
1628
 
1629
1629
 
1630
+ @contextlib.contextmanager
1631
+ def defer(fn: ta.Callable) -> ta.Generator[ta.Callable, None, None]:
1632
+ try:
1633
+ yield fn
1634
+ finally:
1635
+ fn()
1636
+
1637
+
1630
1638
  @contextlib.contextmanager
1631
1639
  def attr_setting(obj, attr, val, *, default=None): # noqa
1632
1640
  not_set = object()