Skip to content

TYP: misc return values #57108

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
Jan 29, 2024
Merged

TYP: misc return values #57108

merged 1 commit into from
Jan 29, 2024

Conversation

twoertwein
Copy link
Member

No description provided.

@@ -1818,10 +1821,14 @@ def value_counts(self, dropna: bool = True) -> Series:
ix = np.append(ix, -1)

ix = coerce_indexer_dtype(ix, self.dtype.categories)
ix = self._from_backing_data(ix)
ix_categorical = self._from_backing_data(ix)
Copy link
Member Author

Choose a reason for hiding this comment

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

I would prefer to set mypy's allow_redefinition to true to avoid having to change the runtime behavior slightly (ix isn't freed immediately). Pyright allows redefinitions.

@twoertwein twoertwein marked this pull request as ready for review January 28, 2024 01:47
@mroeschke mroeschke added the Typing type annotations, mypy/pyright type checking label Jan 29, 2024
@mroeschke mroeschke added this to the 3.0 milestone Jan 29, 2024
@mroeschke mroeschke merged commit b0b1685 into pandas-dev:main Jan 29, 2024
@mroeschke
Copy link
Member

Thanks @twoertwein

pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
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.

2 participants