Comments (2)
Did you ever find the reproducing example? I tried e: Either
but did not resolve in the described error. It would be great to have a test case before this is merged.
from pfun.
Can you try this please, is the minimal example I could found.
from pfun.either import catch
@catch
def hello_world() -> str:
return 'Hello World'
At least here it returns:
/home/hugosenari/.local/share/virtualenvs/my_test-tjBmjRl0/lib/python3.8/site-packages/pfun/effect.py:458: error: INTERNAL ERROR -- Please try using mypy master on Github:
https://mypy.rtfd.io/en/latest/common_issues.html#using-a-development-mypy-build
Please report a bug at https://github.com/python/mypy/issues
version: 0.800
Traceback (most recent call last):
File "mypy/checkexpr.py", line 3898, in accept
File "mypy/nodes.py", line 1555, in accept
File "mypy/checkexpr.py", line 270, in visit_call_expr
File "mypy/checkexpr.py", line 347, in visit_call_expr_inner
File "mypy/checkexpr.py", line 852, in check_call_expr_with_callee_type
File "mypy/checkexpr.py", line 911, in check_call
File "mypy/checkexpr.py", line 1023, in check_callable_call
File "mypy/checkexpr.py", line 732, in apply_function_plugin
File "/home/hugosenari/.local/share/virtualenvs/my_test-tjBmjRl0/lib/python3.8/site-packages/pfun/mypy_plugin.py", line 433, in _effect_recover_hook
return_type_args[0] = _combine_environments(r1, r2)
TypeError: 'tuple' object does not support item assignment
/home/hugosenari/.local/share/virtualenvs/my_test-tjBmjRl0/lib/python3.8/site-packages/pfun/effect.py:458: : note: use --pdb to drop into pdb
from pfun.
Related Issues (20)
- ERROR: Could not build wheels for pfun, which is required to install pyproject.toml-based projects HOT 2
- Release 1.0.0 HOT 2
- Satisfy Effect dependencies without performing side effect
- Allow global thread and process pool executors
- aiohttp.ClientSession read_timeout is deprecated HOT 3
- Intersection can't unify type variables
- Effect.map can't handle generators
- TypeError when using Effect.map with async function
- circular import HOT 5
- tests take far too long to run HOT 4
- Improve documentation
- Distribute hypothesis test strategies
- release gh actions workflow can't publish docs
- Add curried overload to Curry.__call__ type
- Allow to write Curry type without Callable
- Support decoratoring methods with curry in the MyPy plugin
- Support generic types in lens
- SemLock is not implemented when running on AWS Lambda HOT 7
- Cannot infer type argument 1 of Nothing.and_then + other type issues with Maybe HOT 1
- mypy error using effect.combine HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pfun.