2

I use google fire for cli, and met an issue below.

# 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?

Ruli
  • 2,592
  • 12
  • 30
  • 40
Felix Liu
  • 199
  • 2
  • 9

1 Answers1

0

I have solved the issue by updating the fire version to 3.x.

Ruli
  • 2,592
  • 12
  • 30
  • 40
Felix Liu
  • 199
  • 2
  • 9