Maybe a bit of styling to distinguish the parts of the statement? Sometimes it's pity that `py` does not have proper anonymous functions.
```python
lambda ctx: (
    sel.click(
        Quadicon(ctx['datastore'].name, 'datastore')
    ) if "provider" not in ctx
    else nav_to_datastore_through_provider(ctx)
)
```