• 
      

    Prep work for diff settings layers.

    Review Request #14432 — Created May 9, 2025 and submitted

    Information

    Review Board
    release-7.1.x

    Reviewers

    This change does some initial clean-up in preparation for implementing
    settings layers in the diff settings object.

    Ran unit tests.

    Summary ID
    Prep work for diff settings layers.
    This change does some initial clean-up in preparation for implementing settings layers in the diff settings object. Testing Done: Ran unit tests.
    962c84aa1235359593b7a1dc5598570f9ac78e8d
    Description From Last Updated

    line too long (94 > 79 characters) Column: 80 Error code: E501

    reviewbot reviewbot

    line too long (82 > 79 characters) Column: 80 Error code: E501

    reviewbot reviewbot

    line too long (82 > 79 characters) Column: 80 Error code: E501

    reviewbot reviewbot

    This doesn't need the parens.

    maubin maubin

    Can you move some of these into the TYPE_CHECKING block.

    maubin maubin

    Just checking - for casting we have to use Optional instead of | None?

    maubin maubin

    We can't use dict on RB 7.1.x. We still require 3.8+. Same below with other casts.

    chipx86 chipx86

    We have to use Tuple here.

    chipx86 chipx86

    We can't use this form on Python 3.8.

    chipx86 chipx86

    We can't use these forms. Same below.

    chipx86 chipx86

    'typing.TYPE_CHECKING' imported but unused Column: 1 Error code: F401

    reviewbot reviewbot

    This needs to be List[str].

    chipx86 chipx86

    This needs to be Dict[str, Any].

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

    flake8

    david
    maubin
    1. 
        
    2. reviewboard/codesafety/checkers/base.py (Diff revision 2)
       
       
      Show all issues

      This doesn't need the parens.

    3. reviewboard/diffviewer/settings.py (Diff revision 2)
       
       
      Show all issues

      Can you move some of these into the TYPE_CHECKING block.

      1. Looks like no for all of these.

    4. reviewboard/diffviewer/settings.py (Diff revision 2)
       
       
      Show all issues

      Just checking - for casting we have to use Optional instead of | None?

      1. Yeah, X | Y at runtime only works for Python 3.10+

    5. 
        
    david
    maubin
    1. Ship It!
    2. 
        
    chipx86
    1. 
        
    2. reviewboard/admin/forms/diff_settings.py (Diff revision 3)
       
       
       
       
       
       
      Show all issues

      We can't use dict on RB 7.1.x. We still require 3.8+.

      Same below with other casts.

    3. Show all issues

      We have to use Tuple here.

    4. Show all issues

      We can't use this form on Python 3.8.

    5. reviewboard/diffviewer/settings.py (Diff revision 3)
       
       
      Show all issues

      We can't use these forms.

      Same below.

    6. 
        
    david
    Review request changed
    Commits:
    Summary ID
    Prep work for diff settings layers.
    This change does some initial clean-up in preparation for implementing settings layers in the diff settings object. Testing Done: Ran unit tests.
    95512112dbfefb65f82a9249649fa5141e034382
    Prep work for diff settings layers.
    This change does some initial clean-up in preparation for implementing settings layers in the diff settings object. Testing Done: Ran unit tests.
    e522c047a663af349c392692ef3d265d8ede2c84

    Checks run (1 failed, 1 succeeded)

    flake8 failed.
    JSHint passed.

    flake8

    david
    david
    david
    maubin
    1. Ship It!
    2. 
        
    chipx86
    1. 
        
    2. Show all issues

      This needs to be List[str].

    3. Show all issues

      This needs to be Dict[str, Any].

    4. 
        
    david
    chipx86
    1. Ship It!
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-7.1.x (f176784)