Skip to content

Bug: potential naming conflict in generated protocols #644

@Karrenbelt

Description

@Karrenbelt

If a performative in a protocol specification has the same name as custom type, then the tests/performatives.py, which contains helper models for hypothesis testing, will overwrite the existing definition within that scope. Example snippet:

from packages.zarathustra.protocols.asset_bridging.custom_types import (
    BridgeResult,
)


class BridgeResult(BaseModel):
    """Model for the `BRIDGE_RESULT` initial speech act performative."""

    result: BridgeResult


class RequestStatus(BaseModel):
    """Model for the `REQUEST_STATUS` initial speech act performative."""

    result: BridgeResult 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions