Skip to content
Snippets Groups Projects
Commit ae8a273e authored by Carlos Vega's avatar Carlos Vega
Browse files

make pep happy

parent e2668ea2
No related branches found
No related tags found
1 merge request!445Support for Python 3.11
Pipeline #88336 passed
......@@ -771,7 +771,7 @@ def subjects(request: WSGIRequest, subject_list_type: str) -> HttpResponse:
if length == -1:
sliced_subjects = ordered_subjects
else:
sliced_subjects = ordered_subjects[start : (start + length)]
sliced_subjects = ordered_subjects[start: (start + length)]
result_subjects = sliced_subjects
......
......@@ -11,14 +11,15 @@ from django.utils.text import capfirst
from web.algorithm import VerhoeffAlgorithm, LuhnAlgorithm
def strtobool (val):
def strtobool(val):
"""Convert a string representation of truth to true (1) or false (0).
True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
are 'n', 'no', 'f', 'false', 'off', and '0'. Raises ValueError if
'val' is anything else.
From distutils lib
From distutils lib.
"""
val = val.lower()
if val in ('y', 'yes', 't', 'true', 'on', '1'):
......@@ -28,6 +29,7 @@ def strtobool (val):
else:
raise ValueError(f"invalid truth value {val}")
def get_deleted_objects(objs: List[models.Model]):
collector = NestedObjects(using='default')
collector.collect(objs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment