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

CLEAN: Enforce pdep6 #59007

Merged
merged 14 commits into from
Jul 8, 2024
Merged

CLEAN: Enforce pdep6 #59007

merged 14 commits into from
Jul 8, 2024

Conversation

MarcoGorelli
Copy link
Member

@MarcoGorelli MarcoGorelli commented Jun 13, 2024

a few bits still need thinking over

Comment on lines +218 to +219
# Upcast so that we can add .5
df = df.astype({"c": "float64"})
Copy link
Member Author

Choose a reason for hiding this comment

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

manually adding this in so we can keep running the rest of the test

asv_bench/benchmarks/indexing.py Show resolved Hide resolved
asv_bench/benchmarks/indexing.py Outdated Show resolved Hide resolved
@MarcoGorelli MarcoGorelli changed the title WIP Enforce pdep6 CLEAN: Enforce pdep6 Jun 28, 2024
@MarcoGorelli MarcoGorelli marked this pull request as ready for review June 28, 2024 14:32
@@ -428,7 +428,7 @@ def split_and_operate(self, func, *args, **kwargs) -> list[Block]:
# Up/Down-casting

@final
def coerce_to_target_dtype(self, other, warn_on_upcast: bool = False) -> Block:
def coerce_to_target_dtype(self, other, raise_on_upcast: bool = False) -> Block:
Copy link
Member

Choose a reason for hiding this comment

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

Are there any usages of this method, outside this file, that does not set this to raise_on_upcast=False?

Copy link
Member Author

Choose a reason for hiding this comment

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

there's no usage of this method at all outside this file

i've removed the default =False anyway, better to be explicit about this one

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.

Code changes look good. Could you add something in the whatsnew (section or one-liner, up to you) about this enforcement?

@mroeschke mroeschke added this to the 3.0 milestone Jul 8, 2024
@mroeschke mroeschke merged commit 6090042 into pandas-dev:main Jul 8, 2024
45 checks passed
@mroeschke
Copy link
Member

Thanks @MarcoGorelli

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

Successfully merging this pull request may close these issues.

None yet

2 participants