Skip to content

Commit

Permalink
[QMI-094] Change Mapping to MutableMapping type in transport.py
Browse files Browse the repository at this point in the history
… to clarify `parameters` is a mutable type.
  • Loading branch information
Henri Ervasti committed Aug 12, 2024
1 parent bc4d686 commit a798071
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions qmi/core/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import sys
import time
if sys.version_info >= (3, 9):
from collections.abc import Mapping
from collections.abc import MutableMapping
else:
from typing import Mapping
from typing import MutableMapping
from typing import Any, Dict, Optional, List, Tuple, Type

import serial
Expand Down Expand Up @@ -188,15 +188,15 @@ class TransportDescriptorParser:
def __init__(self,
interface: str,
positionals: List[Tuple[str, Tuple[Type, bool]]],
keywords: Mapping[str, Tuple[Type, bool]]
keywords: MutableMapping[str, Tuple[Type, bool]]
) -> None:
self.interface = interface
self._positionals = positionals
self._keywords = keywords

def parse_parameter_strings(
self, transport_descriptor: str, default_parameters: Optional[Dict[str, Any]] = None
) -> Mapping[str, Any]:
) -> MutableMapping[str, Any]:
"""Method for parsing transport descriptor strings.
Parameters:
Expand Down

0 comments on commit a798071

Please sign in to comment.