Switch away from iteration shims.

Review Request #11850 — Created Oct. 14, 2021 and updated

david
Review Board
master
reviewboard

In the Python 2 to 3 conversion, many iteration methods (such as
items() and keys() were changed from returning lists to iterators.
In order to be correct in usage everywhere, we used six to ensure
consistent behavior across versions. Now that we're Python 3+ only on
the master branch, we can get rid of these and just use the builtins.

Ran unit tests.

Summary
Switch away from iteration shims.
Description From Last Updated

Can we use a keyword argument per line?

chipx86chipx86

While here, can we modernize this? all_text_types_extra_data = { _key: {} for _key in extra_text_type_fields.keys() }

chipx86chipx86
Checks run (2 succeeded)
flake8 passed.
JSHint passed.
chipx86
  1. 
      
    1. The review on /r/11854/ is relevant to this change as well.

  2. Can we use a keyword argument per line?

  3. reviewboard/webapi/mixins.py (Diff revision 1)
     
     
     
     

    While here, can we modernize this?

    all_text_types_extra_data = {
        _key: {}
        for _key in extra_text_type_fields.keys()
    }
    
  4. 
      
Loading...