Switch away from iteration shims.
Review Request #11850 — Created Oct. 14, 2021 and submitted
In the Python 2 to 3 conversion, many iteration methods (such as
items()
andkeys()
were changed from returning lists to iterators.
In order to be correct in usage everywhere, we usedsix
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 | ID |
---|---|
e62db00a4e531d577797df057de1f85ab4f67d1a |
Description | From | Last Updated |
---|---|---|
Can we use a keyword argument per line? |
chipx86 | |
While here, can we modernize this? all_text_types_extra_data = { _key: {} for _key in extra_text_type_fields.keys() } |
chipx86 | |
While here, let's make this a bit nicer/less wasteful and use { ... } instead of set([ ... ]). |
chipx86 | |
So here's a question. Why were we even doing this before? Aren't we going from dict to dict? Can't we … |
chipx86 | |
I think this can just be list(self.commits.values()). |
chipx86 | |
Same here. |
chipx86 | |
While here, can we make this a modern dict comprehension? |
chipx86 |
- Change Summary:
-
Made requested changes.
- Commits:
-
Summary ID 34fc10a03919fe41931759ae71252a54538ff84d e34930e1d86f0583885892d739ad06629088accb - Diff:
-
Revision 2 (+276 -340)
Checks run (2 succeeded)
- Commits:
-
Summary ID e34930e1d86f0583885892d739ad06629088accb e62db00a4e531d577797df057de1f85ab4f67d1a - Diff:
-
Revision 3 (+282 -368)