Modernize code in rbintegratons.

Review Request #12483 — Created July 21, 2022 and submitted

david
rbintegrations
release-3.x
rbintegrations

When we updated rbintegrations to work with Review Board 5.0, we only
really did the minimum required to make things work. Because
rbintegrations 3.0+ will only be used with Review Board 5.0+ / Django
3.2+ / Python 3.7+, we can do a lot more. This change updates the
codebase to handle some additional modernization tasks:

  • Remove __future__ imports.
  • Switch from django.conf.urls to django.urls and swap out url() for
    the new path().
  • Move from ugettext to gettext.
  • Eliminate fallback imports and conditional logic for handling various
    versions of Review Board.
  • Ran unit tests.
  • Did some superficial testing setting up various integration
    configurations.
Summary
Modernize code in rbintegratons.
Description From Last Updated

'django.utils.translation.gettext' imported but unused Column: 1 Error code: F401

reviewbotreviewbot

include lines need to be indented 1.

chipx86chipx86

Maybe just return response.data now.

chipx86chipx86
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

david
chipx86
  1. 
      
  2. rbintegrations/extension.py (Diff revision 2)
     
     
     
     
     
     
     
     
     

    include lines need to be indented 1.

  3. rbintegrations/jenkinsci/api.py (Diff revision 2)
     
     
     
     
     
     
     
     

    Maybe just return response.data now.

  4. 
      
maubin
  1. Ship It!
  2. 
      
david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.x (533053b)
Loading...