qntm / greenery

Regular expression manipulation library
http://qntm.org/greenery
MIT License
311 stars 40 forks source link

lint: consistent import order with `isort`, add explicit `__all__` exports #73

Closed rwe closed 1 year ago

rwe commented 1 year ago

This PR modernizes import/export style a bit.

The main thrust is:

  1. Remove the python 2-era coding: utf8 header. Not needed in Python 3.
  2. Prepend from __future__ import annotations to the modules. Safe, improves performance, and allows more modern types (not included here).
  3. Adds isort to sort the imports automatically, and makes those imports all consistent. Includes update to the workflow.yaml.
  4. Adds explicit symbol exports via __all__ to each of the modules.