Linting stuff

This commit is contained in:
zandercymatics 2023-08-14 09:13:22 -06:00
parent 4fa9e78688
commit 5fd842233a
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 3 additions and 3 deletions

View file

@ -8,7 +8,7 @@ logger = logging.getLogger(__name__)
class SortingDictInterface: class SortingDictInterface:
_model_list: Dict[type, type] = {} _model_list: Dict[type, type] = {}
_sort_list: list[type] = [] _sort_list: list[type] = []
sorting_dict = {} sorting_dict: Dict[type, type] = {}
def __init__(self, model_list, sort_list): def __init__(self, model_list, sort_list):
self.sorting_dict = { self.sorting_dict = {
@ -21,7 +21,7 @@ class AdminFormOrderHelper():
"""A helper class to order a dropdown field in Django Admin, takes the fields you want to order by as an array""" # noqa """A helper class to order a dropdown field in Django Admin, takes the fields you want to order by as an array""" # noqa
# Used to keep track of how we want to order_by certain FKs # Used to keep track of how we want to order_by certain FKs
_sorting_dict: [SortingDictInterface] = [...] _sorting_dict: [SortingDictInterface] = [...] # noqa
def __init__(self, sort): def __init__(self, sort):
self._sorting_dict = sort self._sorting_dict = sort

View file

@ -436,7 +436,7 @@ class AuditedAdminTest(TestCase):
self.assertEqual(desired_order, self.assertEqual(desired_order,
current_sort_order_coerced_type, current_sort_order_coerced_type,
"{} is not ordered alphabetically".format(field_name)) "{} is not ordered alphabetically".format(field.name))
# I originally spent some time trying to fully # I originally spent some time trying to fully
# generalize this to replace the match/arg fields, # generalize this to replace the match/arg fields,