It looks unnatural to do `if (not condition) {not block} else {yes block}`. It's easier to read `if (condition) { yes block } else { not block}` So I'd restructure this into:

```python
if dry_run:
    ....
else:
```

Or, alternatively, rename `dry_run` into `do_run` and turn this into an
```python
if do_run:
    ....
else:
```