Skip to content

Commit

Permalink
Flake8 validation - attempt 2
Browse files Browse the repository at this point in the history
  • Loading branch information
NatSquared committed Mar 11, 2024
1 parent bcbdddb commit d9bc58b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions met-api/src/met_api/models/engagement_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ def __repr__(self) -> str:

@property
def preset_values(self) -> list[str]:
"""Get preset values - any metadata entries with no specific engagement
"""
"""Get preset values - any metadata entries with no specific engagement."""
return [entry.value for entry in self.entries if entry.engagement_id is None]

@preset_values.setter
Expand Down
4 changes: 2 additions & 2 deletions met-api/src/met_api/schemas/engagement_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ class Meta:
'get_preset_values', deserialize='set_preset_values')

def get_preset_values(self, obj):
"""This method is used by Marshmallow to serialize the preset_values property
"""
"""Serialize the preset_values property for Marshmallow."""
return obj.preset_values

def set_preset_values(self, values):
"""Deserialize the preset_values into a list of strings.
The rest is handled in the preset_values property setter.
"""
return [str(value) for value in values]
Expand Down
1 change: 1 addition & 0 deletions met-api/tests/utilities/factory_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
from met_api.models.widget_video import WidgetVideo as WidgetVideoModel
from met_api.utils.constants import TENANT_ID_HEADER
from met_api.utils.enums import MembershipStatus
from met_api.constants.email_verification import EmailVerificationType
from tests.utilities.factory_scenarios import (
TestCommentInfo, TestEngagementInfo, TestEngagementMetadataInfo, TestEngagementMetadataTaxonInfo,
TestEngagementSlugInfo, TestFeedbackInfo, TestJwtClaims, TestLanguageInfo, TestParticipantInfo, TestPollAnswerInfo,
Expand Down

0 comments on commit d9bc58b

Please sign in to comment.