Skip to content

CI/TYP: Window typing followup #40392

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 1 commit into from
Mar 12, 2021

Conversation

mroeschke
Copy link
Member

@mroeschke mroeschke commented Mar 12, 2021

  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them

I believe #40293 may have caused the current typing failures in the CI

@mroeschke mroeschke added this to the 1.3 milestone Mar 12, 2021
@mroeschke mroeschke added Typing type annotations, mypy/pyright type checking Window rolling, ewma, expanding labels Mar 12, 2021
@jorisvandenbossche
Copy link
Member

Thanks for the follow-up!

@jorisvandenbossche jorisvandenbossche merged commit bed5ae2 into pandas-dev:master Mar 12, 2021
Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

Merge this to get master green again, but still a question about the actual change

@@ -589,7 +586,7 @@ def quantile(
)
def cov(
self,
other: Optional[Union[np.ndarray, FrameOrSeriesUnion]] = None,
other: Optional[FrameOrSeriesUnion] = None,
Copy link
Member

Choose a reason for hiding this comment

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

How is this change correct? Or is the docstring not correct? (which says that other can also be an ndarray)

Copy link
Member Author

Choose a reason for hiding this comment

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

At least on master, passing a numpy array raises

In [1]: pd.Series(range(10)).expanding().cov(np.arange(10))
Exception: Input arrays must be of the same type!

as well there's a test, test_different_input_array_raise_exception that checks that an Exception is raised with a numpy array.

So I can follow up fixing the documentation

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Typing type annotations, mypy/pyright type checking Window rolling, ewma, expanding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants