Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -294,26 +294,26 @@ tomli==2.2.1 \
--hash=sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272 \
--hash=sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a \
--hash=sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7
ruff==0.13.3 \
--hash=sha256:17b951f9d9afb39330b2bdd2dd144ce1c1335881c277837ac1b50bfd99985ed3 \
--hash=sha256:1a993b17ec03719c502881cb2d5f91771e8742f2ca6de740034433a97c561989 \
--hash=sha256:1c9e6469864f94a98f412f20ea143d547e4c652f45e44f369d7b74ee78185838 \
--hash=sha256:2bdad6512fb666b40fcadb65e33add2b040fc18a24997d2e47fee7d66f7fcae2 \
--hash=sha256:311860a4c5e19189c89d035638f500c1e191d283d0cc2f1600c8c80d6dcd430c \
--hash=sha256:4fb75e7c402d504f7a9a259e0442b96403fa4a7310ffe3588d11d7e170d2b1e3 \
--hash=sha256:5b0ba0db740eefdfbcce4299f49e9eaefc643d4d007749d77d047c2bab19908e \
--hash=sha256:5bf62b705f319476c78891e0e97e965b21db468b3c999086de8ffb0d40fd2822 \
--hash=sha256:6052f8088728898e0a449f0dde8fafc7ed47e4d878168b211977e3e7e854f662 \
--hash=sha256:621e2e5812b691d4f244638d693e640f188bacbb9bc793ddd46837cea0503dd2 \
--hash=sha256:6b139f638a80eae7073c691a5dd8d581e0ba319540be97c343d60fb12949c8d0 \
--hash=sha256:6b547def0a40054825de7cfa341039ebdfa51f3d4bfa6a0772940ed351d2746c \
--hash=sha256:78cc1abed87ce40cb07ee0667ce99dbc766c9f519eabfd948ed87295d8737c60 \
--hash=sha256:8e5640349493b378431637019366bbd73c927e515c9c1babfea3e932f5e68e1d \
--hash=sha256:9cc48a3564423915c93573f1981d57d101e617839bef38504f85f3677b3a0a3e \
--hash=sha256:9e9e9d699841eaf4c2c798fa783df2fabc680b72059a02ca0ed81c460bc58330 \
--hash=sha256:dc742c50f4ba72ce2a3be362bd359aef7d0d302bf7637a6f942eaa763bd292af \
--hash=sha256:f14e0d1fe6460f07814d03c6e32e815bff411505178a1f539a38f6097d3e8ee3 \
--hash=sha256:fc6fa4637284708d6ed4e5e970d52fc3b76a557d7b4e85a53013d9d201d93286
ruff==0.14.0 \
--hash=sha256:16b68e183a0e28e5c176d51004aaa40559e8f90065a10a559176713fcf435206 \
--hash=sha256:30a58c087aef4584c193aebf2700f0fbcfc1e77b89c7385e3139956fa90434e2 \
--hash=sha256:3ba9a8925e90f861502f7d974cc60e18ca29c72bb0ee8bfeabb6ade35a3abde7 \
--hash=sha256:4c63b2d99fafa05efca0ab198fd48fa6030d57e4423df3f18e03aa62518c565f \
--hash=sha256:58e15bffa7054299becf4bab8a1187062c6f8cafbe9f6e39e0d5aface455d6b3 \
--hash=sha256:62ec8969b7510f77945df916de15da55311fade8d6050995ff7f680afe582c57 \
--hash=sha256:668fce701b7a222f3f5327f86909db2bbe99c30877c8001ff934c5413812ac02 \
--hash=sha256:703799d059ba50f745605b04638fa7e9682cc3da084b2092feee63500ff3d9b8 \
--hash=sha256:7450a243d7125d1c032cb4b93d9625dea46c8c42b4f06c6b709baac168e10543 \
--hash=sha256:7eb0499a2e01f6e0c285afc5bac43ab380cbfc17cd43a2e1dd10ec97d6f2c42d \
--hash=sha256:838d1b065f4df676b7c9957992f2304e41ead7a50a568185efd404297d5701e8 \
--hash=sha256:a86bf575e05cb68dcb34e4c7dfe1064d44d3f0c04bbc0491949092192b515296 \
--hash=sha256:c958f66ab884b7873e72df38dcabee03d556a8f2ee1b8538ee1c2bbd619883dd \
--hash=sha256:e41f785498bd200ffc276eb9e1570c019c1d907b07cfb081092c8ad51975bbe7 \
--hash=sha256:ea95da28cd874c4d9c922b39381cbd69cb7e7b49c21b8152b014bd4f52acddc2 \
--hash=sha256:eb732d17db2e945cfcbbc52af0143eda1da36ca8ae25083dd4f66f1542fdf82e \
--hash=sha256:eec3bbbf3a7d5482b5c1f42d5fc972774d71d107d447919fca620b0be3e3b75e \
--hash=sha256:f42c9495f5c13ff841b1da4cb3c2a42075409592825dada7c5885c2c844ac730 \
--hash=sha256:f8d07350bc7af0a5ce8812b7d5c1a7293cf02476752f23fdfc500d24b79b783c
typing_extensions==4.15.0 \
--hash=sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466 \
--hash=sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548
Expand Down
2 changes: 1 addition & 1 deletion src/olympia/reviewers/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ def _set_queryset(self, queryset):
def compress(self, data_list):
data_list = data_list or [None for _ in self.fields]
policy_values = defaultdict(dict)
for field, value in zip(self.fields, data_list):
for field, value in zip(self.fields, data_list, strict=True):
policy_values[field.policy.uuid][field.placeholder] = (
html.unescape(value) if value else value
)
Expand Down
4 changes: 2 additions & 2 deletions src/olympia/scanners/tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,10 +695,10 @@ def test_run_duplicate_values(self, incr_mock):
'rule': 'match_the_fool',
}

for result, locale in zip(narc_result.results[:1], locales):
for result, locale in zip(narc_result.results[:-1], locales, strict=True):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to verify the same thing. Instead of looping once, we seem to loop 5 times? Is this expected?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming the test was wrong in the first place, and the lint rule exposed the bug - that the lists were mismatched because we'd written [:1] rather than [:-1]

If the intention was to only assert the first result you wouldn't bother with the zip and loop, you'd just do:

             assert result[0] == {
                'meta': {
                    'locale': locale[0],
                    'pattern': '^foo$',
                    'source': 'db_addon',
                    'span': [
                        0,
                        3,
                    ],
                    'string': 'foo',
                },
                'rule': 'match_the_fool',
            }

assert result == {
'meta': {
'locale': locale,
'locale': locale.lower(),
'pattern': '^foo$',
'source': 'db_addon',
'span': [
Expand Down
Loading