Skip to content

google fire run @property automatically #311

@spectereye

Description

@spectereye

i use google fire for cli, and met an issue below, could you please help?

# test.py
import fire

class C:
    @property
    def foo(self):
        print('foo')

    def bar(self):
        print('bar')

fire.Fire()

then run as

python test.py C bar

foo
bar

as seen it print "foo" which is unwanted, any elegant way to solve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions