-
Notifications
You must be signed in to change notification settings - Fork 18
typing fixes #235
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
typing fixes #235
Conversation
|
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
@dcherian , finally all green! :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. Just some minor comments
|
||
expect1: T_ExpectOpt | ||
if expect is None: | ||
if isbin_: | ||
raise ValueError( | ||
f"Please provided bin edges for group variable {idx} " | ||
f"named {group_name} in expected_groups." | ||
) | ||
expect_ = _get_expected_groups(b_.data, sort=sort) | ||
expect1 = _get_expected_groups(b_.data, sort=sort) | ||
else: | ||
expect_ = expect | ||
expect_index = _convert_expected_groups_to_index((expect_,), (isbin_,), sort=sort)[0] | ||
expect1 = expect | ||
expect_index = _convert_expected_groups_to_index((expect1,), (isbin_,), sort=sort)[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer expect_
to expect1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found using numbers were much easier to read when you had multiple expect
with varying types:
expect1
similar readabilty to expect_
expect2
much easier to read than expect__
.
This reverts commit 8e55d3a.
…if it has been narrowed down.
* main: (68 commits) convert datetime: micro-optimizations (#261) compatibility with `numpy>=2.0` (#257) replace the deprecated `provision-with-micromamba` with `setup-micromamba` (#258) Fix some typing errors in asv_bench and tests (#253) [pre-commit.ci] pre-commit autoupdate (#250) typing fixes (#235) Fix test failure on i386 (#248) Delete resample_reduce (#246) Bump codecov/codecov-action from 3.1.3 to 3.1.4 (#243) Enable nanargmax, nanargmin (#171) Support nanfirst, nanlast with simple combine algo (#240) Check method only for dask reductions. (#241) Optimize broadcasting (#230) Handle min_count=0 (#238) Try and fix dtypes on 3.8,3.10 windows Preserve input dtypes now that pandas can do it. Add pytest-pretty to envs factorize early as much as possible Bump codecov/codecov-action from 3.1.1 to 3.1.3 (#239) [pre-commit.ci] pre-commit autoupdate (#229) ...
Newer version of mypy has found new issues with the typing.