Skip to content

Commit

Permalink
Avoid importing django.test in main code
Browse files Browse the repository at this point in the history
`setting_changed` is actually from `django.core.signals`, and is re-exported from `django.test.signals`. `django.test` takes 20-40ms to import, so not too much, but it's an easy win to avoid this import.
  • Loading branch information
angusholder authored Apr 26, 2024
1 parent 0940325 commit 7d21736
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion knox/settings.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from datetime import timedelta

from django.conf import settings
from django.test.signals import setting_changed
from django.core.signals import setting_changed
from rest_framework.settings import APISettings, api_settings

USER_SETTINGS = getattr(settings, 'REST_KNOX', None)
Expand Down

0 comments on commit 7d21736

Please sign in to comment.