rycus86 / prometheus_flask_exporter

Prometheus exporter for Flask applications
https://pypi.python.org/pypi/prometheus-flask-exporter
MIT License
645 stars 161 forks source link

refactor: Remove legacy `object` use in classes and legacy `super()` call pattern #150

Closed kkirsche closed 1 year ago

kkirsche commented 1 year ago

This merge request makes two changes:

  1. Removes the use of object as a subclass in classes as this is only for Python 2. This was to address the old style classes from Python 2 and does not exist in Python 3. See https://www.python.org/doc/newstyle/ for additional details.
  2. This updates the way that super is used to avoid the various arguments and to take advantage of how this works by default in modern versions of Python 3, as outlined on https://docs.python.org/3/library/functions.html#super

Additional adjustments to formatting behaviors in the tests module is possible, these will be evaluated after this.

Changes were detected using the pyupgrade tool with a 3.7 target.

coveralls commented 1 year ago

Coverage Status

Coverage: 84.526%. Remained the same when pulling 4a0efff6010b7f3924d6c6c1a79533b67de6bded on kkirsche:refactor/legacy-code-removal into 17896008c9db1df1f5c3b65a10d581fbe4f001c8 on rycus86:master.

rycus86 commented 1 year ago

Thank you!