Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pydantic pattern for non-hashable default values (i.e. lists) #2546

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

basedBaba
Copy link

closes #2543

Checklist

  • No CHANGELOG update needed
  • No new tests needed
  • No documentation update needed

@basedBaba basedBaba marked this pull request as ready for review December 25, 2024 07:48
Copy link
Collaborator

@williballenthin williballenthin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think there's a conceptual difference between an empty list and None. None indicates that we don't have the data, while the empty list shows we have the data but there was nothing in it.

@basedBaba
Copy link
Author

basedBaba commented Dec 29, 2024

Ah yes, I understand your point. According to #2537 (comment), I thought the intention behind this issue was to avoid checks for such fields (as None and [] both have a truth value of False) and to use the same pattern throughout the code.
(Really sorry for the late response and re-review mis-click as well)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use pydantic pattern for non-hashable default values (i.e. lists)
2 participants