Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions pyproject.toml

This file was deleted.

5 changes: 2 additions & 3 deletions testinfra/modules/puppet.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@
# limitations under the License.

import json
from typing import Dict

from testinfra.modules.base import InstanceModule


def parse_puppet_resource(data: str) -> Dict[str, Dict[str, str]]:
def parse_puppet_resource(data: str) -> dict[str, dict[str, str]]:
"""Parse data returned by 'puppet resource'
$ puppet resource user
Expand All @@ -38,7 +37,7 @@ def parse_puppet_resource(data: str) -> Dict[str, Dict[str, str]]:
[...]
"""

state: Dict[str, Dict[str, str]] = {}
state: dict[str, dict[str, str]] = {}
current = None
for line in data.splitlines():
if not current:
Expand Down
6 changes: 3 additions & 3 deletions testinfra/modules/socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import functools
import socket
from typing import List, Optional, Tuple
from typing import Optional

from testinfra.modules.base import Module

Expand Down Expand Up @@ -121,7 +121,7 @@ def is_listening(self):
)

@property
def clients(self) -> List[Optional[Tuple[str, int]]]:
def clients(self) -> list[Optional[tuple[str, int]]]:
"""Return a list of clients connected to a listening socket

For tcp and udp sockets a list of pair (address, port) is returned.
Expand All @@ -134,7 +134,7 @@ def clients(self) -> List[Optional[Tuple[str, int]]]:
[None, None, None]

"""
sockets: List[Optional[Tuple[str, int]]] = []
sockets: list[Optional[tuple[str, int]]] = []
for sock in self._iter_sockets(False):
if sock[0] != self.protocol:
continue
Expand Down