Code Monkey home page Code Monkey logo

Comments (2)

suned avatar suned commented on August 28, 2024

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.

hugosenari avatar hugosenari commented on August 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.