ominfra 0.0.0.dev161__py3-none-any.whl → 0.0.0.dev162__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.
ominfra/scripts/manage.py CHANGED
@@ -5489,7 +5489,7 @@ class InjectorBinder:
5489
5489
  def __new__(cls, *args, **kwargs): # noqa
5490
5490
  raise TypeError
5491
5491
 
5492
- _FN_TYPES: ta.Tuple[type, ...] = (
5492
+ _FN_TYPES: ta.ClassVar[ta.Tuple[type, ...]] = (
5493
5493
  types.FunctionType,
5494
5494
  types.MethodType,
5495
5495
 
@@ -5511,7 +5511,7 @@ class InjectorBinder:
5511
5511
  cls._FN_TYPES = (*cls._FN_TYPES, icls)
5512
5512
  return icls
5513
5513
 
5514
- _BANNED_BIND_TYPES: ta.Tuple[type, ...] = (
5514
+ _BANNED_BIND_TYPES: ta.ClassVar[ta.Tuple[type, ...]] = (
5515
5515
  InjectorProvider,
5516
5516
  )
5517
5517
 
@@ -5690,45 +5690,35 @@ def bind_injector_eager_key(key: ta.Any) -> InjectorBinding:
5690
5690
  ##
5691
5691
 
5692
5692
 
5693
- class Injection:
5694
- def __new__(cls, *args, **kwargs): # noqa
5695
- raise TypeError
5696
-
5693
+ class InjectionApi:
5697
5694
  # keys
5698
5695
 
5699
- @classmethod
5700
- def as_key(cls, o: ta.Any) -> InjectorKey:
5696
+ def as_key(self, o: ta.Any) -> InjectorKey:
5701
5697
  return as_injector_key(o)
5702
5698
 
5703
- @classmethod
5704
- def array(cls, o: ta.Any) -> InjectorKey:
5699
+ def array(self, o: ta.Any) -> InjectorKey:
5705
5700
  return dc.replace(as_injector_key(o), array=True)
5706
5701
 
5707
- @classmethod
5708
- def tag(cls, o: ta.Any, t: ta.Any) -> InjectorKey:
5702
+ def tag(self, o: ta.Any, t: ta.Any) -> InjectorKey:
5709
5703
  return dc.replace(as_injector_key(o), tag=t)
5710
5704
 
5711
5705
  # bindings
5712
5706
 
5713
- @classmethod
5714
- def as_bindings(cls, *args: InjectorBindingOrBindings) -> InjectorBindings:
5707
+ def as_bindings(self, *args: InjectorBindingOrBindings) -> InjectorBindings:
5715
5708
  return as_injector_bindings(*args)
5716
5709
 
5717
- @classmethod
5718
- def override(cls, p: InjectorBindings, *args: InjectorBindingOrBindings) -> InjectorBindings:
5710
+ def override(self, p: InjectorBindings, *args: InjectorBindingOrBindings) -> InjectorBindings:
5719
5711
  return injector_override(p, *args)
5720
5712
 
5721
5713
  # injector
5722
5714
 
5723
- @classmethod
5724
- def create_injector(cls, *args: InjectorBindingOrBindings, parent: ta.Optional[Injector] = None) -> Injector:
5715
+ def create_injector(self, *args: InjectorBindingOrBindings, parent: ta.Optional[Injector] = None) -> Injector:
5725
5716
  return _Injector(as_injector_bindings(*args), parent)
5726
5717
 
5727
5718
  # binder
5728
5719
 
5729
- @classmethod
5730
5720
  def bind(
5731
- cls,
5721
+ self,
5732
5722
  obj: ta.Any,
5733
5723
  *,
5734
5724
  key: ta.Any = None,
@@ -5763,35 +5753,32 @@ class Injection:
5763
5753
 
5764
5754
  # helpers
5765
5755
 
5766
- @classmethod
5767
5756
  def bind_factory(
5768
- cls,
5757
+ self,
5769
5758
  fn: ta.Callable[..., T],
5770
5759
  cls_: U,
5771
5760
  ann: ta.Any = None,
5772
5761
  ) -> InjectorBindingOrBindings:
5773
- return cls.bind(make_injector_factory(fn, cls_, ann))
5762
+ return self.bind(make_injector_factory(fn, cls_, ann))
5774
5763
 
5775
- @classmethod
5776
5764
  def bind_array(
5777
- cls,
5765
+ self,
5778
5766
  obj: ta.Any = None,
5779
5767
  *,
5780
5768
  tag: ta.Any = None,
5781
5769
  ) -> InjectorBindingOrBindings:
5782
5770
  return bind_injector_array(obj, tag=tag)
5783
5771
 
5784
- @classmethod
5785
5772
  def bind_array_type(
5786
- cls,
5773
+ self,
5787
5774
  ele: ta.Union[InjectorKey, InjectorKeyCls],
5788
5775
  cls_: U,
5789
5776
  ann: ta.Any = None,
5790
5777
  ) -> InjectorBindingOrBindings:
5791
- return cls.bind(make_injector_array_type(ele, cls_, ann))
5778
+ return self.bind(make_injector_array_type(ele, cls_, ann))
5792
5779
 
5793
5780
 
5794
- inj = Injection
5781
+ inj = InjectionApi()
5795
5782
 
5796
5783
 
5797
5784
  ########################################
@@ -4548,7 +4548,7 @@ class InjectorBinder:
4548
4548
  def __new__(cls, *args, **kwargs): # noqa
4549
4549
  raise TypeError
4550
4550
 
4551
- _FN_TYPES: ta.Tuple[type, ...] = (
4551
+ _FN_TYPES: ta.ClassVar[ta.Tuple[type, ...]] = (
4552
4552
  types.FunctionType,
4553
4553
  types.MethodType,
4554
4554
 
@@ -4570,7 +4570,7 @@ class InjectorBinder:
4570
4570
  cls._FN_TYPES = (*cls._FN_TYPES, icls)
4571
4571
  return icls
4572
4572
 
4573
- _BANNED_BIND_TYPES: ta.Tuple[type, ...] = (
4573
+ _BANNED_BIND_TYPES: ta.ClassVar[ta.Tuple[type, ...]] = (
4574
4574
  InjectorProvider,
4575
4575
  )
4576
4576
 
@@ -4749,45 +4749,35 @@ def bind_injector_eager_key(key: ta.Any) -> InjectorBinding:
4749
4749
  ##
4750
4750
 
4751
4751
 
4752
- class Injection:
4753
- def __new__(cls, *args, **kwargs): # noqa
4754
- raise TypeError
4755
-
4752
+ class InjectionApi:
4756
4753
  # keys
4757
4754
 
4758
- @classmethod
4759
- def as_key(cls, o: ta.Any) -> InjectorKey:
4755
+ def as_key(self, o: ta.Any) -> InjectorKey:
4760
4756
  return as_injector_key(o)
4761
4757
 
4762
- @classmethod
4763
- def array(cls, o: ta.Any) -> InjectorKey:
4758
+ def array(self, o: ta.Any) -> InjectorKey:
4764
4759
  return dc.replace(as_injector_key(o), array=True)
4765
4760
 
4766
- @classmethod
4767
- def tag(cls, o: ta.Any, t: ta.Any) -> InjectorKey:
4761
+ def tag(self, o: ta.Any, t: ta.Any) -> InjectorKey:
4768
4762
  return dc.replace(as_injector_key(o), tag=t)
4769
4763
 
4770
4764
  # bindings
4771
4765
 
4772
- @classmethod
4773
- def as_bindings(cls, *args: InjectorBindingOrBindings) -> InjectorBindings:
4766
+ def as_bindings(self, *args: InjectorBindingOrBindings) -> InjectorBindings:
4774
4767
  return as_injector_bindings(*args)
4775
4768
 
4776
- @classmethod
4777
- def override(cls, p: InjectorBindings, *args: InjectorBindingOrBindings) -> InjectorBindings:
4769
+ def override(self, p: InjectorBindings, *args: InjectorBindingOrBindings) -> InjectorBindings:
4778
4770
  return injector_override(p, *args)
4779
4771
 
4780
4772
  # injector
4781
4773
 
4782
- @classmethod
4783
- def create_injector(cls, *args: InjectorBindingOrBindings, parent: ta.Optional[Injector] = None) -> Injector:
4774
+ def create_injector(self, *args: InjectorBindingOrBindings, parent: ta.Optional[Injector] = None) -> Injector:
4784
4775
  return _Injector(as_injector_bindings(*args), parent)
4785
4776
 
4786
4777
  # binder
4787
4778
 
4788
- @classmethod
4789
4779
  def bind(
4790
- cls,
4780
+ self,
4791
4781
  obj: ta.Any,
4792
4782
  *,
4793
4783
  key: ta.Any = None,
@@ -4822,35 +4812,32 @@ class Injection:
4822
4812
 
4823
4813
  # helpers
4824
4814
 
4825
- @classmethod
4826
4815
  def bind_factory(
4827
- cls,
4816
+ self,
4828
4817
  fn: ta.Callable[..., T],
4829
4818
  cls_: U,
4830
4819
  ann: ta.Any = None,
4831
4820
  ) -> InjectorBindingOrBindings:
4832
- return cls.bind(make_injector_factory(fn, cls_, ann))
4821
+ return self.bind(make_injector_factory(fn, cls_, ann))
4833
4822
 
4834
- @classmethod
4835
4823
  def bind_array(
4836
- cls,
4824
+ self,
4837
4825
  obj: ta.Any = None,
4838
4826
  *,
4839
4827
  tag: ta.Any = None,
4840
4828
  ) -> InjectorBindingOrBindings:
4841
4829
  return bind_injector_array(obj, tag=tag)
4842
4830
 
4843
- @classmethod
4844
4831
  def bind_array_type(
4845
- cls,
4832
+ self,
4846
4833
  ele: ta.Union[InjectorKey, InjectorKeyCls],
4847
4834
  cls_: U,
4848
4835
  ann: ta.Any = None,
4849
4836
  ) -> InjectorBindingOrBindings:
4850
- return cls.bind(make_injector_array_type(ele, cls_, ann))
4837
+ return self.bind(make_injector_array_type(ele, cls_, ann))
4851
4838
 
4852
4839
 
4853
- inj = Injection
4840
+ inj = InjectionApi()
4854
4841
 
4855
4842
 
4856
4843
  ########################################
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ominfra
3
- Version: 0.0.0.dev161
3
+ Version: 0.0.0.dev162
4
4
  Summary: ominfra
5
5
  Author: wrmsr
6
6
  License: BSD-3-Clause
@@ -12,8 +12,8 @@ Classifier: Operating System :: OS Independent
12
12
  Classifier: Operating System :: POSIX
13
13
  Requires-Python: >=3.12
14
14
  License-File: LICENSE
15
- Requires-Dist: omdev==0.0.0.dev161
16
- Requires-Dist: omlish==0.0.0.dev161
15
+ Requires-Dist: omdev==0.0.0.dev162
16
+ Requires-Dist: omlish==0.0.0.dev162
17
17
  Provides-Extra: all
18
18
  Requires-Dist: paramiko~=3.5; extra == "all"
19
19
  Requires-Dist: asyncssh~=2.18; extra == "all"
@@ -76,8 +76,8 @@ ominfra/manage/targets/inject.py,sha256=P4597xWM-V3I_gCt2O71OLhYQkkXtuJvkYRsIbhh
76
76
  ominfra/manage/targets/targets.py,sha256=CFl8Uirgn3gfowO1Fn-LBK-6qYqEMFJ9snPUl0gCRuM,1753
77
77
  ominfra/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
78
78
  ominfra/scripts/journald2aws.py,sha256=EC8tSKW3hztBV_Kr_ykK72AmcvnWivUxcz6Sfg3M_hI,155085
79
- ominfra/scripts/manage.py,sha256=MQQGcgbIDwUfD31nDGJD2DhWhlazj8GVwQi7kOzi3gc,293788
80
- ominfra/scripts/supervisor.py,sha256=npGYEWSZfY7E24mdkJ3HrL_ax6AcqjHfqh-7nZ_sX0U,273987
79
+ ominfra/scripts/manage.py,sha256=mslFxApTHF_954w462BIpZdk9V1oy02fJhcN1N1-Wf4,293592
80
+ ominfra/scripts/supervisor.py,sha256=uPcw4o8gt8xvQ97jXK-WBAaZj3D81Lq9tqDoKxGvLCU,273791
81
81
  ominfra/supervisor/LICENSE.txt,sha256=yvqaMNsDhWxziHa9ien6qCW1SkZv-DQlAg96XjfSee8,1746
82
82
  ominfra/supervisor/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
83
83
  ominfra/supervisor/__main__.py,sha256=I0yFw-C08OOiZ3BF6lF1Oiv789EQXu-_j6whDhQUTEA,66
@@ -119,9 +119,9 @@ ominfra/tailscale/api.py,sha256=C5-t_b6jZXUWcy5k8bXm7CFnk73pSdrlMOgGDeGVrpw,1370
119
119
  ominfra/tailscale/cli.py,sha256=h6akQJMl0KuWLHS7Ur6WcBZ2JwF0DJQhsPTnFBdGyNk,3571
120
120
  ominfra/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
121
121
  ominfra/tools/listresources.py,sha256=4qVg5txsb10EHhvqXXeM6gJ2jx9LbroEnPydDv1uXs0,6176
122
- ominfra-0.0.0.dev161.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
123
- ominfra-0.0.0.dev161.dist-info/METADATA,sha256=9BUyOL7-nhzomsloRZDx7T8VL-T0KbCHxyQ74LxzbFY,731
124
- ominfra-0.0.0.dev161.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
125
- ominfra-0.0.0.dev161.dist-info/entry_points.txt,sha256=kgecQ2MgGrM9qK744BoKS3tMesaC3yjLnl9pa5CRczg,37
126
- ominfra-0.0.0.dev161.dist-info/top_level.txt,sha256=E-b2OHkk_AOBLXHYZQ2EOFKl-_6uOGd8EjeG-Zy6h_w,8
127
- ominfra-0.0.0.dev161.dist-info/RECORD,,
122
+ ominfra-0.0.0.dev162.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
123
+ ominfra-0.0.0.dev162.dist-info/METADATA,sha256=tmh0OqIMABojtwp_fUbGyKMod6s85abgUC2tuyhS30Q,731
124
+ ominfra-0.0.0.dev162.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
125
+ ominfra-0.0.0.dev162.dist-info/entry_points.txt,sha256=kgecQ2MgGrM9qK744BoKS3tMesaC3yjLnl9pa5CRczg,37
126
+ ominfra-0.0.0.dev162.dist-info/top_level.txt,sha256=E-b2OHkk_AOBLXHYZQ2EOFKl-_6uOGd8EjeG-Zy6h_w,8
127
+ ominfra-0.0.0.dev162.dist-info/RECORD,,