Improve typing in some review-request related code.

Review Request #14017 — Created July 9, 2024 and submitted

Information

Review Board
release-7.x

Reviewers

This change just has some typing and docs improvements in some code that
I've been touching to do the new admin-draft stuff.

Ran unit tests.

Summary ID
Improve typing in some review-request related code.
This change just has some typing and docs improvements in some code that I've been touching to do the new admin-draft stuff. Testing Done: Ran unit tests.
4e20de2fdfde719807259d80ed3181e7da719fec
Description From Last Updated

undefined name 'Tuple' Column: 10 Error code: F821

reviewbotreviewbot

undefined name 'List' Column: 29 Error code: F821

reviewbotreviewbot

trailing whitespace Column: 48 Error code: W291

reviewbotreviewbot

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

reviewbotreviewbot

These lines should be swapped.

chipx86chipx86

What is pending typed as?

chipx86chipx86

We shoudl probably use Sequence, since this doesn't need to be a mutable result.

chipx86chipx86

Might be a good time to begin making these arguments keyword-only.

chipx86chipx86

Missing Args.

chipx86chipx86

While here you could get rid of the "Return" language and "Returns" section, and use "Type:" instead.

maubinmaubin

Forgot to document **kwargs.

maubinmaubin

Missing a ** prefix to kwargs.

maubinmaubin

Missing Args.

chipx86chipx86

No colon here.

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

flake8

david
chipx86
  1. 
      
  2. Show all issues

    These lines should be swapped.

  3. Show all issues

    What is pending typed as?

    1. Should be bool but we don't have typing for scmtool/repository in the right place. I'll just remove this for now.

  4. Show all issues

    We shoudl probably use Sequence, since this doesn't need to be a mutable result.

  5. reviewboard/reviews/models/review_request.py (Diff revision 2)
     
     
     
     
     
     
     
    Show all issues

    Might be a good time to begin making these arguments keyword-only.

    1. I'd rather not chase down all the call sites for this right now.

  6. Show all issues

    Missing Args.

  7. 
      
david
maubin
  1. 
      
  2. reviewboard/reviews/models/review_request.py (Diff revision 3)
     
     
     
     
     
     
     
     
     
     
     
     
     
    Show all issues

    While here you could get rid of the "Return" language and "Returns" section, and use "Type:" instead.

  3. reviewboard/reviews/models/review_request.py (Diff revision 3)
     
     
     
     
     
     
     
     
     
     
     
     
    Show all issues

    Forgot to document **kwargs.

  4. Show all issues

    Missing a ** prefix to kwargs.

  5. 
      
david
maubin
  1. Ship It!
  2. 
      
chipx86
  1. 
      
  2. reviewboard/reviews/models/review_request.py (Diff revision 4)
     
     
     
     
    Show all issues

    Missing Args.

  3. Show all issues

    No colon here.

  4. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-7.x (398a752)