sourcery refactoring
I tried applying https://sourcery.ai/github/ , seems like there's some nice suggestions here. I removed the ones where they change things like
```diff
- if param:
-     var = a
- else:
-     var = b
+ var = a if param else b
```