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

async callable objects #247

Open
jpic opened this issue Apr 22, 2020 · 1 comment
Open

async callable objects #247

jpic opened this issue Apr 22, 2020 · 1 comment

Comments

@jpic
Copy link

@jpic jpic commented Apr 22, 2020

With the following script:

class Build:    
    async def __call__(self):    
        pass           
                       
import fire                   
fire.Fire(dict(build=Build()))

Doing ./test.py build outputs:

NAME
    test.py build

SYNOPSIS
    test.py build GROUP | COMMAND | VALUE

GROUPS
    GROUP is one of the following:

     cr_code
       code(argcount, posonlyargcount, kwonlyargcount, nlocals, stacksize, flags, codestring, constants, names, varnames, filename, name, firstlineno, lnotab[, freevars[, ce$

     cr_frame

COMMANDS
    COMMAND is one of the following:

     close
       close() -> raise GeneratorExit inside coroutine.

     send
       send(arg) -> send 'arg' into coroutine, return next iterated value or raise StopIteration.

     throw
       throw(typ[,val[,tb]]) -> raise exception in coroutine, return next iterated value or raise StopIteration.

VALUES
    VALUE is one of the following:

     cr_await

     cr_origin

     cr_running

Instead of firing Build().__call__ as expected.

jpic added a commit to jpic/python-fire that referenced this issue Apr 23, 2020
@jpic
Copy link
Author

@jpic jpic commented Jul 15, 2020

Hello,

This is fixed in #247, ready to merge.

Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.