Skip to content

Commit

Permalink
Use OrderedSet as default set_class
Browse files Browse the repository at this point in the history
  • Loading branch information
lafrech committed Oct 27, 2021
1 parent df4f811 commit 623a338
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/marshmallow/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ class AlbumSchema(Schema):

OPTIONS_CLASS = SchemaOpts # type: type

set_class = OrderedSet

# These get set by SchemaMeta
opts = None # type: SchemaOpts
_declared_fields = {} # type: typing.Dict[str, ma_fields.Field]
Expand Down Expand Up @@ -411,10 +413,6 @@ def __repr__(self) -> str:
def dict_class(self) -> type:
return OrderedDict if self.ordered else dict

@property
def set_class(self) -> type:
return OrderedSet if self.ordered else set

@classmethod
def from_dict(
cls,
Expand Down

0 comments on commit 623a338

Please sign in to comment.