"""
Base classes for value objects used in Topsy.

We use the attrs package to reduce boilerplate for all Topsy entities: "All attrs does is take
your declaration, write dunder methods based on that information, and attach them to your class."
"""

import attr


class Entity:
    """
    Base class for all Topsy entities.

    Attaches attrs helper methods for convenience, and so that our business logic doesn't need to
    rely on attrs directly.
    """

    def replace(self, **kwargs):
        """Return new instance of this entity with updated field."""
        return attr.assoc(self, **kwargs)

    def asdict(self):
        """Return class attributes in a dictionary."""
        return attr.asdict(self)

8910054a7008b45fbc6fd3e736a0afd6536bac20
<mask token>


class Entity:
    <mask token>

    def replace(self, **kwargs):
        """Return new instance of this entity with updated field."""
        return attr.assoc(self, **kwargs)
    <mask token>

<mask token>


class Entity:
    <mask token>

    def replace(self, **kwargs):
        """Return new instance of this entity with updated field."""
        return attr.assoc(self, **kwargs)

    def asdict(self):
        """Return class attributes in a dictionary."""
        return attr.asdict(self)

<mask token>


class Entity:
    """
    Base class for all Topsy entities.

    Attaches attrs helper methods for convenience, and so that our business logic doesn't need to
    rely on attrs directly.
    """

    def replace(self, **kwargs):
        """Return new instance of this entity with updated field."""
        return attr.assoc(self, **kwargs)

    def asdict(self):
        """Return class attributes in a dictionary."""
        return attr.asdict(self)

<mask token>
import attr


class Entity:
    """
    Base class for all Topsy entities.

    Attaches attrs helper methods for convenience, and so that our business logic doesn't need to
    rely on attrs directly.
    """

    def replace(self, **kwargs):
        """Return new instance of this entity with updated field."""
        return attr.assoc(self, **kwargs)

    def asdict(self):
        """Return class attributes in a dictionary."""
        return attr.asdict(self)

"""
Base classes for value objects used in Topsy.

We use the attrs package to reduce boilerplate for all Topsy entities: "All attrs does is take
your declaration, write dunder methods based on that information, and attach them to your class."
"""

import attr


class Entity:
    """
    Base class for all Topsy entities.

    Attaches attrs helper methods for convenience, and so that our business logic doesn't need to
    rely on attrs directly.
    """

    def replace(self, **kwargs):
        """Return new instance of this entity with updated field."""
        return attr.assoc(self, **kwargs)

    def asdict(self):
        """Return class attributes in a dictionary."""
        return attr.asdict(self)
