Skip to content

Commit

Permalink
[DATALAD RUNCMD] run codespell throughout fixing few left typos autom…
Browse files Browse the repository at this point in the history
…agically

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
  • Loading branch information
yarikoptic committed Nov 21, 2024
1 parent 182c711 commit f4411d9
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion examples/4_service_to_service/example_client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Client for service to service example.
Kicks off exmaple by sending message to service one, and then
Kicks off example by sending message to service one, and then
waits for an event from service one to confirm the messages were passed between the two services properly.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def publish(self, topic: str, payload: bytes, persist: bool) -> None:
topic: The topic on which to publish the message as a string.
payload: The message to publish, as raw bytes.
persist: Determine if the message should live until queue consumers or available (True), or
if it should be removed immediatedly (False)
if it should be removed immediately (False)
"""
# NOTE: RabbitMQ only works with QOS of 1 and 0, and seems to convert QOS2 to QOS1
self._connection.publish(topic, payload, qos=2 if persist else 0)
Expand Down
2 changes: 1 addition & 1 deletion src/intersect_sdk/_internal/event_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def definition_metadata_differences(
) -> list[tuple[str, str, str]]:
"""Return a list of differences between 'definition' and 'metadata'.
First tuple value = defintion key
First tuple value = definition key
Second tuple value = second value
Third tuple value = already cached value
"""
Expand Down
2 changes: 1 addition & 1 deletion src/intersect_sdk/_internal/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def create_external_request(
response_handler: INTERSECT_SERVICE_RESPONSE_CALLBACK_TYPE | None = None,
timeout: float = 300.0,
) -> UUID:
"""Observed entity (capabilitiy) tells observer (i.e. service) to send an external request.
"""Observed entity (capability) tells observer (i.e. service) to send an external request.
Params:
- request: the request we want to send out, encapsulated as an IntersectDirectMessageParams object
Expand Down
2 changes: 1 addition & 1 deletion src/intersect_sdk/_internal/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ def get_schema_and_functions_from_capability_implementations(
if cap_status_fn_name and cap_status_schema and cap_status_type_adapter:
if status_function_name is not None:
# TODO may want to change this later
die('Only one capabilitiy may have an @intersect_status function')
die('Only one capability may have an @intersect_status function')
status_function_cap = capability_type
status_function_name = cap_status_fn_name
status_function_schema = cap_status_schema
Expand Down
2 changes: 1 addition & 1 deletion src/intersect_sdk/config/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@


class HierarchyConfig(BaseModel):
"""Configuration for registring this service in a system-of-system architecture."""
"""Configuration for registering this service in a system-of-system architecture."""

service: Annotated[str, Field(pattern=HIERARCHY_REGEX)]
"""
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def some_func(self) -> bool: ...
assert len(errors) == 1
assert {'type': 'missing', 'loc': ('event_type',)} in errors

# special case: we have a custom vaildator for event_type which fails on some common instantiations
# special case: we have a custom validator for event_type which fails on some common instantiations
with pytest.raises(ValidationError) as ex:

class BadEventArgs4(IntersectBaseCapabilityImplementation):
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/test_schema_invalids.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class PydanticUnparsableInner:
three: str

@intersect_message()
def cant_parse_annotation(self, unparseable: PydanticUnparsableInner) -> None: ...
def cant_parse_annotation(self, unparsable: PydanticUnparsableInner) -> None: ...

with pytest.raises(SystemExit):
get_schema_helper([PydanticUnparsable])
Expand All @@ -158,7 +158,7 @@ def mock_message(self) -> object: ...

def test_disallow_object_subtyping(caplog: pytest.LogCaptureFixture):
# should fail because return type has a subtyping object (dynamic typing)
# note that 'object' is evalutated exactly like it is as a root type
# note that 'object' is evaluated exactly like it is as a root type
class MockObjectSubtype(IntersectBaseCapabilityImplementation):
intersect_sdk_capability_name = 'unused'

Expand Down Expand Up @@ -456,7 +456,7 @@ def mock_message(self, param: Inner) -> None: ...


def test_disallow_ambiguous_typealiastype(caplog: pytest.LogCaptureFixture):
# should fail because the TypeVar is ambigous and would resolve to "Any"
# should fail because the TypeVar is ambiguous and would resolve to "Any"
class AmbiguousTypeAliasType(IntersectBaseCapabilityImplementation):
intersect_sdk_capability_name = 'unused'
T = TypeVar('T')
Expand Down Expand Up @@ -975,4 +975,4 @@ def status_function_2(self) -> str: ...

with pytest.raises(SystemExit):
get_schema_helper([CapabilityName1, CapabilityName2])
assert 'Only one capabilitiy may have an @intersect_status function' in caplog.text
assert 'Only one capability may have an @intersect_status function' in caplog.text

0 comments on commit f4411d9

Please sign in to comment.