-
- Downloads
[FIX] P3: remove pycompat.{keys,items,values} helpers
Now that we're closer to switching to P3 for good, these helpers have outlived their usefulness, and mostly add noise. All remaining dict.iter*() or dict.view*() must be converted to the normal keys(), values() or items() calls. Whenever the result is likely to be used for more than the scope of a loop, or when the dict needs to be modified during iteration, the calls must be wrapped in a ``list()``, to protect the new P3 semantics. Those cases are very exceptional. Also removed some dead code or improved the API to remove unnecessary conversions.
Showing
- addons/account/models/account.py 1 addition, 1 deletionaddons/account/models/account.py
- addons/account/models/account_invoice.py 6 additions, 6 deletionsaddons/account/models/account_invoice.py
- addons/account/models/chart_template.py 1 addition, 3 deletionsaddons/account/models/chart_template.py
- addons/account/models/partner.py 3 additions, 3 deletionsaddons/account/models/partner.py
- addons/account/report/account_report_financial.py 8 additions, 9 deletionsaddons/account/report/account_report_financial.py
- addons/account/tests/test_reconciliation.py 2 additions, 4 deletionsaddons/account/tests/test_reconciliation.py
- addons/account_asset/models/account_asset.py 3 additions, 3 deletionsaddons/account_asset/models/account_asset.py
- addons/account_voucher/models/account_voucher.py 1 addition, 2 deletionsaddons/account_voucher/models/account_voucher.py
- addons/auth_signup/controllers/main.py 1 addition, 2 deletionsaddons/auth_signup/controllers/main.py
- addons/auth_signup/models/res_partner.py 0 additions, 2 deletionsaddons/auth_signup/models/res_partner.py
- addons/base_address_extended/models/base_address_extended.py 1 addition, 2 deletionsaddons/base_address_extended/models/base_address_extended.py
- addons/base_automation/models/base_automation.py 1 addition, 2 deletionsaddons/base_automation/models/base_automation.py
- addons/base_gengo/wizard/base_gengo_translations.py 1 addition, 2 deletionsaddons/base_gengo/wizard/base_gengo_translations.py
- addons/base_import/models/base_import.py 4 additions, 4 deletionsaddons/base_import/models/base_import.py
- addons/base_import/models/odf_ods_reader.py 1 addition, 3 deletionsaddons/base_import/models/odf_ods_reader.py
- addons/base_import_module/models/ir_module.py 2 additions, 2 deletionsaddons/base_import_module/models/ir_module.py
- addons/calendar/models/calendar.py 3 additions, 3 deletionsaddons/calendar/models/calendar.py
- addons/event/models/event.py 1 addition, 2 deletionsaddons/event/models/event.py
- addons/fleet/models/fleet_vehicle_cost.py 1 addition, 3 deletionsaddons/fleet/models/fleet_vehicle_cost.py
- addons/gamification/models/goal.py 4 additions, 4 deletionsaddons/gamification/models/goal.py
Loading
Please register or sign in to comment