Skip to content

Commit fee1990

Browse files
committed
Fix some declaration issues
1 parent 5fe092b commit fee1990

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/utcp/client/variable_substitutor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def substitute(self, obj: Any, config: UtcpClientConfig, provider_name: Optional
1212
pass
1313

1414
@abstractmethod
15-
def find_required_variables(self, obj: Any, config: UtcpClientConfig, provider_name: Optional[str] = None) -> List[str]:
15+
def find_required_variables(self, obj: dict | list | str, provider_name: str) -> List[str]:
1616
pass
1717

1818
class DefaultVariableSubstitutor(VariableSubstitutor):

src/utcp/shared/provider.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class TCPProvider(Provider):
139139
description="Strategy for framing TCP messages"
140140
)
141141
# Length-prefix framing options
142-
length_prefix_bytes: int = Field(
142+
length_prefix_bytes: Literal[1, 2, 4, 8] = Field(
143143
default=4,
144144
description="Number of bytes for length prefix (1, 2, 4, or 8). Used with 'length_prefix' framing."
145145
)
@@ -182,7 +182,7 @@ class UDPProvider(Provider):
182182
provider_type: Literal["udp"] = "udp"
183183
host: str
184184
port: int
185-
number_of_response_datagrams: int = 0
185+
number_of_response_datagrams: int = 1
186186
request_data_format: Literal["json", "text"] = "json"
187187
request_data_template: Optional[str] = None
188188
response_byte_format: Optional[str] = Field(default="utf-8", description="Encoding to decode response bytes. If None, returns raw bytes.")

0 commit comments

Comments
 (0)