snapshottest icon indicating copy to clipboard operation
snapshottest copied to clipboard

Remove Python 2 compatibility code

Open medmunds opened this issue 3 years ago • 6 comments

Good first issue for anyone looking to contribute. Support for Python <3.5 was dropped after the 0.6.0 release, so there are some leftover Python 2-isms that can be removed from the code:

  • [ ] Drop object as a superclass—change all class ClassName(object): to just class ClassName:
  • [ ] Change all super(ClassName, self).method(...) calls to just super().method(...)
  • [ ] Remove all # -*- coding: utf-8 -*- markers (source and generated snapshot headers)
  • [ ] Remove all from __future__ imports (~source and~ generated snapshot headers)

[Note: you might be tempted to also update string formatting to use f-strings, but those aren't available until Python 3.6, so we'll need to hold off for now.]

medmunds avatar Oct 03 '20 19:10 medmunds