<commit_before>"""
byceps.events.shop
~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2020 <NAME>
:License: Modified BSD, see LICENSE for details.
"""

from dataclasses import dataclass

from ..services.shop.order.transfer.models import OrderID
from ..typing import UserID

from .base import _BaseEvent


@dataclass(frozen=True)
class _ShopOrderEvent(_BaseEvent):
    order_id: OrderID
    initiator_id: UserID


@dataclass(frozen=True)
class ShopOrderPlaced(_ShopOrderEvent):
    pass


@dataclass(frozen=True)
class ShopOrderCanceled(_ShopOrderEvent):
    pass
<commit_msg>Make shop event initiator optional<commit_after>"""
byceps.events.shop
~~~~~~~~~~~~~~~~~~

:Copyright: 2006-2020 <NAME>
:License: Modified BSD, see LICENSE for details.
"""

from dataclasses import dataclass
from typing import Optional

from ..services.shop.order.transfer.models import OrderID
from ..typing import UserID

from .base import _BaseEvent


@dataclass(frozen=True)
class _ShopOrderEvent(_BaseEvent):
    order_id: OrderID
    initiator_id: Optional[UserID]


@dataclass(frozen=True)
class ShopOrderPlaced(_ShopOrderEvent):
    pass


@dataclass(frozen=True)
class ShopOrderCanceled(_ShopOrderEvent):
    pass

{'fraction_non_alphanumeric': 0.11962931760741365, 'fraction_numerical': 0.013479359730412805, 'mean_word_length': 5.711864406779661, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3354363', 'n_tokens_mistral': 406, 'n_tokens_neox': 375, 'n_words': 94}