• 
      

    Store Review UIs in a real registry.

    Review Request #13536 — Created Feb. 12, 2024 and submitted

    Information

    Review Board
    master

    Reviewers

    We had a kind of registry-like pattern for Review UIs, where we had
    methods for registering and unregistering, and then stored them in a
    list. This change adds a real registry for the backend storage.

    Ran unit tests.

    Summary ID
    Store Review UIs in a real registry.
    We had a kind of registry-like pattern for Review UIs, where we had methods for registering and unregistering, and then stored them in a list. This change adds a real registry for the backend storage. Testing Done: Ran unit tests.
    edc0cb7b51fa20679df54bbe14d74f02f56f4271
    Description From Last Updated

    Missing docs with Version Added.

    chipx86chipx86

    Should be separated with a blank line (ideally, import would be at the top of the function). If we move …

    chipx86chipx86

    Should use Type for now, until we deprecate some older versions of Python. This is important because The type[...] actually …

    chipx86chipx86

    We could use an f-string here.

    chipx86chipx86
    maubin
    1. Ship It!
    2. 
        
    chipx86
    1. 
        
    2. reviewboard/reviews/ui/__init__.py (Diff revision 1)
       
       
       
      Show all issues

      Missing docs with Version Added.

    3. reviewboard/reviews/ui/base.py (Diff revision 1)
       
       
       
      Show all issues

      Should be separated with a blank line (ideally, import would be at the top of the function).

      If we move the registry import into registry.py, and forward that in reviewboard.reviews.ui, there won't even be a need for this in-function import. We're a bit inconsistent today in our pattern here.

      This comment applies to all following imports.

    4. reviewboard/reviews/ui/registry.py (Diff revision 1)
       
       
      Show all issues

      Should use Type for now, until we deprecate some older versions of Python.

      This is important because The type[...] actually gets executed by Python, and will fail if type doesn't support generics.

    5. reviewboard/reviews/ui/registry.py (Diff revision 1)
       
       
      Show all issues

      We could use an f-string here.

    6. 
        
    david
    chipx86
    1. Ship It!
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-7.x (3ae4307)