Skip to content

Commit

Permalink
Meta: set option unsafe_hash to False by default
Browse files Browse the repository at this point in the history
This was always the intended behaviour, oops.

Might be good to have a test which thoroughly tests the
properties of a default data class.
  • Loading branch information
biqqles committed Jun 1, 2021
1 parent 734ee76 commit e80b6c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dataclassy/dataclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def factory(producer: Callable[[], Factory.Produces]) -> Factory.Produces:

class DataClassMeta(type):
"""The metaclass that implements data class behaviour."""
DEFAULT_OPTIONS = dict(init=True, repr=True, eq=True, iter=False, frozen=False, kwargs=False, slots=False,
order=False, unsafe_hash=True, hide_internals=True)
DEFAULT_OPTIONS = dict(init=True, repr=True, eq=True, iter=False, frozen=False, order=False, unsafe_hash=False,
kwargs=False, slots=False, hide_internals=True)

def __new__(mcs, name, bases, dict_, **kwargs):
"""Create a new data class."""
Expand Down

0 comments on commit e80b6c8

Please sign in to comment.