Skip to content

STYLE upgrade black formatter #51348

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 2 commits into from
Feb 14, 2023

Conversation

MarcoGorelli
Copy link
Member

gonna have to do this eventually...

I'm trying to tell if it changed anything other than just deleting newlines, any git masters know how to do that?

Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

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

Highlighting changes other than removed new lines and the change to black versions

The added newlines are interesting; not sure why it's doing that.

Comment on lines -188 to +194
) -> tuple[
np.ndarray, # np.ndarray[subclass-specific]
npt.NDArray[np.intp],
] | np.ndarray: ... # np.ndarray[subclass-specific]
) -> (
tuple[
np.ndarray, # np.ndarray[subclass-specific]
npt.NDArray[np.intp],
]
| np.ndarray
): ... # np.ndarray[subclass-specific]
Copy link
Member

Choose a reason for hiding this comment

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

Here

@@ -168,7 +168,7 @@ def pytest_collection_modifyitems(items, config) -> None:
if "/frame/" in item.nodeid:
item.add_marker(pytest.mark.arraymanager)

for (mark, kwd, skip_if_found, arg_name) in marks:
for mark, kwd, skip_if_found, arg_name in marks:
Copy link
Member

Choose a reason for hiding this comment

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

Here

@@ -1700,6 +1695,7 @@ def diff(arr, n: int, axis: AxisInt = 0):
# --------------------------------------------------------------------
# Helper functions


Copy link
Member

Choose a reason for hiding this comment

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

Here

@@ -939,7 +937,7 @@ def series_generator(self):
yield obj._ixs(i, axis=0)

else:
for (arr, name) in zip(values, self.index):
for arr, name in zip(values, self.index):
Copy link
Member

Choose a reason for hiding this comment

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

Here

@@ -48,6 +48,7 @@ def concat_compat(to_concat, axis: AxisInt = 0, ea_compat_axis: bool = False):
-------
a single array, preserving the combined dtypes
"""

Copy link
Member

Choose a reason for hiding this comment

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

Here

@@ -205,7 +204,7 @@ def test_iter_expanding_series(ser, expected, min_periods):
# GH 11704
expected = [Series(values, index=index) for (values, index) in expected]

for (expected, actual) in zip(expected, ser.expanding(min_periods)):
for expected, actual in zip(expected, ser.expanding(min_periods)):
Copy link
Member

Choose a reason for hiding this comment

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

Here

for (expected, actual) in zip(
expected, df.rolling(window, min_periods=min_periods)
):
for expected, actual in zip(expected, df.rolling(window, min_periods=min_periods)):
Copy link
Member

Choose a reason for hiding this comment

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

Here

for (expected, actual) in zip(
expected, ser.rolling(window, min_periods=min_periods)
):
for expected, actual in zip(expected, ser.rolling(window, min_periods=min_periods)):
Copy link
Member

Choose a reason for hiding this comment

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

Here

@@ -948,7 +942,7 @@ def test_iter_rolling_datetime(expected, expected_index, window):
Series(values, index=idx) for (values, idx) in zip(expected, expected_index)
]

for (expected, actual) in zip(expected, ser.rolling(window)):
for expected, actual in zip(expected, ser.rolling(window)):
Copy link
Member

Choose a reason for hiding this comment

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

Here

@@ -393,6 +393,7 @@ def run(self):
# ----------------------------------------------------------------------
# Specification of Dependencies


Copy link
Member

Choose a reason for hiding this comment

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

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.

thanks! did you do this manually or do you have some magical git diff option? 🧙

Copy link
Member

Choose a reason for hiding this comment

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

Ah, just manual.

@mroeschke mroeschke added the Code Style Code style, linting, code_checks label Feb 13, 2023
@MarcoGorelli
Copy link
Member Author

thanks @rhshadrach for going through the changes - I think they look fine

@lithomas1 is it OK to go ahead with this, or does it need to wait til after the release?

@lithomas1
Copy link
Member

+1 on landing, let's do this before the branch cut.

@MarcoGorelli
Copy link
Member Author

cool, I've updated - let's merge on green-ish then?

@lithomas1 lithomas1 added this to the 2.0 milestone Feb 14, 2023
@mroeschke
Copy link
Member

Sorry I just merged a few PRs since this got updated.

Since it's a style change that could impact all PRs, lets rebase once more (I won't merge any other PRs) and get this in

@MarcoGorelli
Copy link
Member Author

I just tried fetching and merging upstream/main locally, and then did pre-commit run --all-files, and everything passed

So I think we should be safe to just merge directly

@mroeschke
Copy link
Member

Ah nice thanks for checking.

@mroeschke mroeschke merged commit fe85cbf into pandas-dev:main Feb 14, 2023
@mroeschke
Copy link
Member

Thanks @MarcoGorelli

@MarcoGorelli
Copy link
Member Author

thank you

So I think we should be safe to just merge directly

If this doesn't work I accept full blame

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants