ominfra 0.0.0.dev426__py3-none-any.whl → 0.0.0.dev428__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.
@@ -1,13 +1,13 @@
1
1
  # ruff: noqa: UP006 UP007 UP045
2
2
  import abc
3
3
  import dataclasses as dc
4
- import logging
5
4
  import traceback
6
5
  import typing as ta
7
6
 
8
7
  from omlish.lite.abstract import Abstract
9
8
  from omlish.lite.check import check
10
9
  from omlish.lite.strings import snake_case
10
+ from omlish.logs.protocols import LoggerLike
11
11
 
12
12
 
13
13
  CommandT = ta.TypeVar('CommandT', bound='Command')
@@ -93,7 +93,7 @@ class CommandExecutor(Abstract, ta.Generic[CommandT, CommandOutputT]):
93
93
  self,
94
94
  cmd: CommandT,
95
95
  *,
96
- log: ta.Optional[logging.Logger] = None,
96
+ log: ta.Optional[LoggerLike] = None,
97
97
  omit_exc_object: bool = False,
98
98
  ) -> CommandOutputOrException[CommandOutputT]:
99
99
  try:
@@ -13,6 +13,7 @@ import typing as ta
13
13
  from omlish.lite.abstract import Abstract
14
14
  from omlish.lite.check import check
15
15
  from omlish.logs.modules import get_module_logger
16
+ from omlish.logs.protocols import LoggerLike
16
17
 
17
18
  from ..commands.base import Command
18
19
  from ..commands.base import CommandException
@@ -397,7 +398,7 @@ class RemoteCommandExecutor(CommandExecutor):
397
398
  self,
398
399
  cmd: Command,
399
400
  *,
400
- log: ta.Optional[logging.Logger] = None, # noqa
401
+ log: ta.Optional[LoggerLike] = None, # noqa
401
402
  omit_exc_object: bool = False,
402
403
  ) -> CommandOutputOrException:
403
404
  try: