Style fixes
Run pre-commit (which seems to have been ignored for some time) and add pyupgrade for Python 3.7+. Fix a bug with writer requiring Python 2.7?!
Run pre-commit (which seems to have been ignored for some time) and add pyupgrade for Python 3.7+. Fix a bug with writer requiring Python 2.7?!