Skip to content

CI: Upgrade mypy to 0.990 #49626

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 4 commits into from
Nov 16, 2022
Merged

CI: Upgrade mypy to 0.990 #49626

merged 4 commits into from
Nov 16, 2022

Conversation

phofl
Copy link
Member

@phofl phofl commented Nov 10, 2022

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

@@ -1646,10 +1646,12 @@ def __array_ufunc__(self, ufunc: np.ufunc, method: str, *inputs, **kwargs):


class ExtensionArraySupportsAnyAll(ExtensionArray):
def any(self, *, skipna: bool = True) -> bool:
def any(self, *, skipna: bool = True) -> bool: # type: ignore[empty-body]
Copy link
Member

Choose a reason for hiding this comment

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

Another option I think is to make these abstract methods - I haven't checked if that's viable, and maybe not something you'd want to handle here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Would be ok with doing that, but would like to keep things separated

@mroeschke mroeschke added the Typing type annotations, mypy/pyright type checking label Nov 10, 2022
@jbrockmendel
Copy link
Member

jbrockmendel commented Nov 11, 2022

i upgraded mypy to 0.990 the other day and now im getting

% mypy pandas
/usr/local/lib/python3.10/site-packages/dask/utils.py:366: error: Parenthesized context managers are only supported in Python 3.9 and greater  [syntax]
Found 1 error in 1 file (errors prevented further checking)

update downgrading to 0.982 didn't make the error go away, so no idea whats going on

Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

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

LGTM @rhshadrach merge when ready

@rhshadrach rhshadrach merged commit c04bba4 into pandas-dev:main Nov 16, 2022
@rhshadrach rhshadrach added this to the 2.0 milestone Nov 16, 2022
@rhshadrach
Copy link
Member

Thanks @phofl

@phofl phofl deleted the upgrade_mypy branch November 18, 2022 10:24
MarcoGorelli pushed a commit to MarcoGorelli/pandas that referenced this pull request Nov 18, 2022
mliu08 pushed a commit to mliu08/pandas that referenced this pull request Nov 27, 2022
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants