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

Update CHANGELOG and fix mypy compatibility for curry.partial #2094

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AdrianAcala
Copy link

@AdrianAcala AdrianAcala commented Apr 2, 2025

  • Added a bugfix entry in CHANGELOG for curry.partial compatibility with mypy 1.6.1+.
  • Modified inference.py to use a local variable for argument inference context.
  • Added mypy configuration file and a test for partial functionality in test_partial.py.

I have made things!

Checklist

  • I have double checked that there are no unrelated changes in this pull request (old patches, accidental config files, etc)
  • I have created at least one test case for the changes I have made
  • I have updated the documentation for the changes I have made (since this is just fixing dependency issues, I didn't think a documentation update was necessary)
  • I have added my changes to the CHANGELOG.md

Related issues

🙏 Please, if you or your company finds dry-python valuable, help us sustain the project by sponsoring it transparently on https://github.com/sponsors/dry-python. As a thank you, your profile/company logo will be added to our main README which receives hundreds of unique visitors per day.

@@ -0,0 +1,10 @@
from returns.curry import partial
Copy link
Member

Choose a reason for hiding this comment

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

We use typesafety/ folder for typing tests.
You can find test_curry there.

@@ -82,13 +82,15 @@ def _infer_constraints(
self._fallback.arg_names,
lambda index: checker.accept(exprs[index]),
)

arg_context = checker.argument_infer_context()
Copy link
Member

Choose a reason for hiding this comment

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

Sorry, how does this change fix the mypy compat? What even is the problem that we are fixing here?

@AdrianAcala AdrianAcala marked this pull request as draft April 3, 2025 07:17
@AdrianAcala AdrianAcala force-pushed the 1711-fix-mypy-1-6-1 branch from 85a19c5 to a06a7e9 Compare April 3, 2025 15:08
- Added a bugfix entry in CHANGELOG for `curry.partial` compatibility with mypy 1.6.1+.
- Modified `inference.py` to use a local variable for argument inference context.
- Added mypy configuration file and a test for `partial` functionality in `test_partial.py`.
@AdrianAcala AdrianAcala force-pushed the 1711-fix-mypy-1-6-1 branch from a06a7e9 to efa6e4e Compare April 3, 2025 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Mypy 1.6.1 fails with returns 0.21.0 on use of curry.partial
2 participants