if you want to avoid the \ you could do:
```
if (not params['versions'] or
    params['report_type'] in ('products', 'distinct_install')):
```