Skip to content

BUG: relocate to_offset and other pyrefly-inspired changes - #1878

Merged
loicdiridollou merged 2 commits into
pandas-dev:mainfrom
cmp0xff:pyrefly-only-changes
Aug 6, 2026
Merged

BUG: relocate to_offset and other pyrefly-inspired changes#1878
loicdiridollou merged 2 commits into
pandas-dev:mainfrom
cmp0xff:pyrefly-only-changes

Conversation

@cmp0xff

@cmp0xff cmp0xff commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

to_offset has been moved from pandas-stubs/tseries/frequencies.pyi to pandas-stubs/_libs/tslibs/offsets.pyi.

@cmp0xff
cmp0xff force-pushed the pyrefly-only-changes branch 2 times, most recently from eea8d2f to b3cf1f8 Compare August 6, 2026 09:30
Comment thread .pre-commit-config.yaml Outdated
@cmp0xff
cmp0xff force-pushed the pyrefly-only-changes branch from b3cf1f8 to 65ee77e Compare August 6, 2026 14:01

@loicdiridollou loicdiridollou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @cmp0xff

@loicdiridollou
loicdiridollou merged commit b0e7014 into pandas-dev:main Aug 6, 2026
14 checks passed
@cmp0xff
cmp0xff deleted the pyrefly-only-changes branch August 6, 2026 14:14
Comment thread tests/frame/test_frame.py
return x.max() - k * x.min()

check(
# pyrefly: ignore[implicity-any-lambda]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

IMHO, I think we should always ignore this from pyrefly, because the pattern of doing lambdas this way is common.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will do in #1867 or so

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What about pyright reportUnknownLambdaType?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

same - I don't think we should be expecting our tests to handle that, because it is pretty natural to NOT add types to lambda functions.

My philosophy on the tests is that we want to have in our tests code that people are likely to write. Trying to make that fully compliant with any/all type checkers with some of the more strict errors puts a burden on people using the code. We can make our own choices as to which error messages we are willing to support.

Dr-Irv pushed a commit that referenced this pull request Aug 7, 2026
…`implicity-any-lambda` (#1879)

* facebook/pyrefly#4427

* facebook/pyrefly#4439

* facebook/pyrefly#4443

* pyrefly implicit-any-lambda

* pyrefly and pyright

* pyright_all

* remove private api
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants