ONSdigital / design-team

An empty repository as the hub for design team tickets (Issues).
0 stars 0 forks source link

Remove Python Specific Syntax - 2 #70

Open willcAND opened 1 year ago

willcAND commented 1 year ago

Tasks for this ticket:

  1. Investigate if making this change breaks anything in Python.
  2. Discuss with the team to decide whether further works/tickets are required.
  3. If so, create tickets to outline the work required.

Across the codebase we are using the python specific syntax seen below.

One example would be inside the select component.

{% for attribute, value in (params.attributes.items() if params.attributes is mapping and params.attributes.items else params.attributes) %}

Inside this same component we are using the following shorthand version. Could we remove the above line in favour of the shorthand?

{% for attribute, value in params.attributes %}{{ attribute }}="{{ value }}"{% endfor %}

Need to test this to see if it causes any issues inside a python application.

yatesn commented 1 year ago

May need @rmccar support?

willcAND commented 1 year ago

Will cause multiple breaking changes across 90% of the components - added low prio label.