Skip to content

CLN: de-duplicate validator #37458

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

Merged
merged 3 commits into from
Oct 30, 2020
Merged

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx
  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

f"value should be a '{self._scalar_type.__name__}', 'NaT', "
f"or array of those. Got '{type(value).__name__}' instead."
)
msg = self._validation_error_message(value, True)
Copy link
Member

Choose a reason for hiding this comment

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

Nice de-duplication.
I suggest using the named argument allow_listlike=True for clarity.
Otherwise, looks good to me.

Copy link
Contributor

Choose a reason for hiding this comment

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

@jbrockmendel yeah might be more clear (but ok to do in next cleanup PR)

@jreback jreback added Admin Administrative tasks related to the pandas project Indexing Related to indexing on series/frames, not to indexes themselves Clean labels Oct 29, 2020
@jreback jreback added this to the 1.2 milestone Oct 29, 2020
@jreback jreback removed the Admin Administrative tasks related to the pandas project label Oct 29, 2020
@jreback jreback merged commit 699c0e6 into pandas-dev:master Oct 30, 2020
@jbrockmendel jbrockmendel deleted the cln-dtvalidators-3 branch October 30, 2020 17:02
kesmit13 pushed a commit to kesmit13/pandas that referenced this pull request Nov 2, 2020
ukarroum pushed a commit to ukarroum/pandas that referenced this pull request Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants