mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-07 01:48:54 -04:00
Adjust positional arguments flagged by flake8-bugbear
The new release of flake8-bugbear is starting to flag positional argument unpacking that comes after keyword arguments in function calls as a style warning that fails. This is a good thing to catch because it can lead to unexpected side effects with function arguments and/or errors thrown by Python. See the following links for more details: - https://stackoverflow.com/questions/58961715/python-value-unpacking-order-in-method-parameters - https://github.com/python/cpython/issues/82741 This changeset fixes a couple of instances where the positional argument unpacking was happening after keyword arguments were being provided. Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
@@ -956,9 +956,9 @@ class OnOffField(GovukRadiosField):
|
||||
]
|
||||
super().__init__(
|
||||
label,
|
||||
*args,
|
||||
choices=choices,
|
||||
thing=f"{choices[0][1].lower()} or {choices[1][1].lower()}",
|
||||
*args,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user