Do some code housecleaning.

Review Request #12079 — Created Feb. 23, 2022 and submitted — Latest diff uploaded

Information

Djblets
release-3.x

Reviewers

This change just makes some relatively mechanical cleanups:

  • Fix iteration of TEMPLATES default to not try to iterate over None
  • Remove or add blank lines and spaces to conform to python style
    standards.
  • Remove some unused variable definitions.
  • Always use cls as the bound variable for classmethods.
  • Fix a place where we were catching a URLError but then accessing
    data that's only available on HTTPError.

Ran unit tests.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Do some code housecleaning.
This change just makes some relatively mechanical cleanups: - Fix iteration of TEMPLATES default to not try to iterate over `None` - Remove or add blank lines and spaces to conform to python style standards. - Remove some unused variable definitions. - Always use `cls` as the bound variable for classmethods. - Fix a place where we were catching a `URLError` but then accessing data that's only available on `HTTPError`. Testing Done: Ran unit tests.
64036f6eee4f400ac64922dc37098a293c161298 David Trowbridge
djblets/cache/serials.py
djblets/db/tests/test_relation_counter_field.py
djblets/extensions/manager.py
djblets/forms/fields.py
djblets/log/__init__.py
djblets/log/middleware.py
djblets/recaptcha/mixins.py
djblets/registries/errors.py
djblets/siteconfig/models.py
djblets/template/tests/test_caches.py
djblets/util/humanize.py
djblets/util/templatetags/djblets_images.py
djblets/util/templatetags/djblets_utils.py
djblets/webapi/errors.py
djblets/webapi/models.py
djblets/webapi/oauth2_scopes.py
djblets/webapi/responses.py
Loading...