From d201ca5e24be2ee3012ec419ec1a21295017837e Mon Sep 17 00:00:00 2001 From: Federico Ressi Date: Thu, 15 Jul 2021 14:49:04 +0200 Subject: [PATCH] Update typing hints in log digger tools Change-Id: I814d73e1a359ea740b138503e1dfd23f994d5650 --- tobiko/openstack/topology/_topology.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tobiko/openstack/topology/_topology.py b/tobiko/openstack/topology/_topology.py index cd09691e6..c740acee6 100644 --- a/tobiko/openstack/topology/_topology.py +++ b/tobiko/openstack/topology/_topology.py @@ -196,8 +196,8 @@ class OpenStackTopology(tobiko.SharedFixture): _connection.SSHConnectionManager) # In Devstack based env logs can be accessed by journalctl - file_digger_class: typing.Type - file_digger_class = files.JournalLogDigger + file_digger_class: typing.Type[files.LogFileDigger] = \ + files.JournalLogDigger # This is dict which handles mapping of the log file and systemd_unit (if # needed) for the OpenStack services. @@ -490,12 +490,12 @@ def get_openstack_topology(topology_class: typing.Type = None) -> \ def get_log_file_digger( service_name: str, - pattern: typing.Optional[str] = None, - groups: typing.Optional[typing.List[str]] = None, - topology: typing.Optional[OpenStackTopology] = None, + pattern: str = None, + groups: typing.List[str] = None, + topology: OpenStackTopology = None, sudo=True, - **execute_params) -> \ - files.MultihostLogFileDigger: + **execute_params) \ + -> files.MultihostLogFileDigger: if topology is None: topology = get_openstack_topology() return topology.get_log_file_digger(service_name=service_name,