Improve rbext create boilerplate, add type hints.

Review Request #14543 — Created July 31, 2025 and submitted

Information

Review Board
release-7.1.x

Reviewers

The boilerplate created by rbext create was a little bit crufty,
having a mix of fake code and real. This change cleans that up so that
it's true boilerplate only, and all the fake stuff is in comments.

This change also modernizes the implementation of rbext with type
hints and some modern syntax nicety.

Generated extensions with rbext create.

Summary ID
Improve rbext create boilerplate, add type hints.
The boilerplate created by `rbext create` was a little bit crufty, having a mix of fake code and real. This change cleans that up so that it's true boilerplate only, and all the fake stuff is in comments. This change also modernizes the implementation of `rbext` with type hints and some modern syntax nicety. Testing Done: Generated extensions with `rbext create`.
f16b7b90afcc4f767f3a6c2e624c1b1b5ed59ce7
Description From Last Updated

This differs from the previous implementation. The primary document header is missing the leading row of ====s.

chipx86chipx86

We can get rid of the u prefix handling now, just return a repr().

chipx86chipx86

While here can you add the "Returns" section in the docs for this.

maubinmaubin

We should mention .ts files here too.

maubinmaubin
chipx86
  1. Very nice cleanup. Just two small things.

  2. reviewboard/cmdline/rbext.py (Diff revision 1)
     
     
     
     
     
     
     
    Show all issues

    This differs from the previous implementation. The primary document header is missing the leading row of ====s.

    1. That's because it's now creating a README.md instead of a README.rst

  3. reviewboard/cmdline/rbext.py (Diff revision 1)
     
     
     
     
     
     
     
    Show all issues

    We can get rid of the u prefix handling now, just return a repr().

  4. 
      
david
maubin
  1. 
      
  2. reviewboard/cmdline/rbext.py (Diff revision 2)
     
     
    Show all issues

    While here can you add the "Returns" section in the docs for this.

  3. reviewboard/cmdline/rbext.py (Diff revision 2)
     
     
    Show all issues

    We should mention .ts files here too.

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