Prep work for diff settings layers.

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

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.
75ce028ba10157b200886aa8c6941c8c3f21f4b7
Description From Last Updated

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

reviewbotreviewbot

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

reviewbotreviewbot

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

reviewbotreviewbot

This doesn't need the parens.

maubinmaubin

Can you move some of these into the TYPE_CHECKING block.

maubinmaubin

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

maubinmaubin

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

chipx86chipx86

We have to use Tuple here.

chipx86chipx86

We can't use this form on Python 3.8.

chipx86chipx86

We can't use these forms. Same below.

chipx86chipx86

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

reviewbotreviewbot
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
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.
8ccd7ad0665d01f49fc254974c67fa7a5edfea74
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.
75ce028ba10157b200886aa8c6941c8c3f21f4b7

Checks run (2 succeeded)

flake8 passed.
JSHint passed.