juju / python-libjuju

Python library for the Juju API
Apache License 2.0
59 stars 98 forks source link

Fix function signature for local_refresh #1100

Open dimaqq opened 4 days ago

dimaqq commented 4 days ago

Description

The code assumes quite a lot about the arguments. It seems that there are no users of the function today, because the arguments are kinda broken.

Folks work around by calling juju cli instead, e.g.:

# oidc-gatekeeper-operator/tests/integration/test_charm.py
149-        print("Try to refresh stable charm to locally built")
150-        # temporary measure while we don't have a solution for this:
151-        # * https://github.com/juju/python-libjuju/issues/881
152:        # Currently `application.local_refresh` doesn't work as expected.

Urgency

Casually reporting

Python-libjuju version

any

Juju version

any

Reproduce / Test

pyright
dimaqq commented 4 days ago

See 0771a65 for an attempt to do this.