Backslash line continuation is bad. Rather use parens and an extra indent, like so:
```python
    if (session.get('state', None) == self.STATE_SELECTED and
            session['active_endpoint'] in self.target_endpoints(config)):
```