From 2deb2068723a787c96096a9a74cb29d5a384ccf2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Laur=C3=A9line=20Gu=C3=A9rin?= <zebuline@entrouvert.com>
Date: Fri, 9 Jul 2021 15:34:03 +0200
Subject: [PATCH 03/23] misc: fix unused-import pylint error (#55505)

---
 chrono/agendas/management/commands/send_booking_reminders.py | 3 +--
 .../agendas/management/commands/update_event_recurrences.py  | 1 -
 .../migrations/0012_manual_set_slugs_on_meeting_types.py     | 2 +-
 chrono/agendas/migrations/0028_event_slug.py                 | 1 -
 .../0066_timeperiodexceptionsource_unique_settings_slug.py   | 2 +-
 chrono/manager/widgets.py                                    | 1 -
 chrono/settings.py                                           | 2 +-
 chrono/urls_utils.py                                         | 5 -----
 chrono/utils/signature.py                                    | 1 -
 tests/test_import_export.py                                  | 1 -
 tests/test_sso.py                                            | 2 --
 11 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/chrono/agendas/management/commands/send_booking_reminders.py b/chrono/agendas/management/commands/send_booking_reminders.py
index c68e681..400f819 100644
--- a/chrono/agendas/management/commands/send_booking_reminders.py
+++ b/chrono/agendas/management/commands/send_booking_reminders.py
@@ -16,7 +16,6 @@
 
 from datetime import datetime, timedelta
 from smtplib import SMTPException
-from urllib.parse import urljoin
 
 import pytz
 from django.conf import settings
@@ -29,7 +28,7 @@ from django.utils import timezone, translation
 from django.utils.translation import ugettext_lazy as _
 from requests import RequestException
 
-from chrono.agendas.models import Agenda, Booking
+from chrono.agendas.models import Booking
 from chrono.utils.requests_wrapper import requests
 
 SENDING_IN_PROGRESS = datetime(year=2, month=1, day=1, tzinfo=pytz.UTC)
diff --git a/chrono/agendas/management/commands/update_event_recurrences.py b/chrono/agendas/management/commands/update_event_recurrences.py
index c7e3764..6e2f3ac 100644
--- a/chrono/agendas/management/commands/update_event_recurrences.py
+++ b/chrono/agendas/management/commands/update_event_recurrences.py
@@ -15,7 +15,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 from django.core.management.base import BaseCommand
-from django.utils import timezone
 
 from chrono.agendas.models import Agenda
 
diff --git a/chrono/agendas/migrations/0012_manual_set_slugs_on_meeting_types.py b/chrono/agendas/migrations/0012_manual_set_slugs_on_meeting_types.py
index bf956eb..b89564d 100644
--- a/chrono/agendas/migrations/0012_manual_set_slugs_on_meeting_types.py
+++ b/chrono/agendas/migrations/0012_manual_set_slugs_on_meeting_types.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 from __future__ import unicode_literals
 
-from django.db import migrations, models
+from django.db import migrations
 from django.utils.text import slugify
 
 
diff --git a/chrono/agendas/migrations/0028_event_slug.py b/chrono/agendas/migrations/0028_event_slug.py
index d9bc4c2..9ef556b 100644
--- a/chrono/agendas/migrations/0028_event_slug.py
+++ b/chrono/agendas/migrations/0028_event_slug.py
@@ -2,7 +2,6 @@
 from __future__ import unicode_literals
 
 from django.db import migrations, models
-from django.utils.text import slugify
 
 
 class Migration(migrations.Migration):
diff --git a/chrono/agendas/migrations/0066_timeperiodexceptionsource_unique_settings_slug.py b/chrono/agendas/migrations/0066_timeperiodexceptionsource_unique_settings_slug.py
index 199b3cf..f8a92fc 100644
--- a/chrono/agendas/migrations/0066_timeperiodexceptionsource_unique_settings_slug.py
+++ b/chrono/agendas/migrations/0066_timeperiodexceptionsource_unique_settings_slug.py
@@ -2,7 +2,7 @@
 # Generated by Django 1.11.18 on 2020-10-21 11:56
 from __future__ import unicode_literals
 
-from django.db import migrations, models
+from django.db import migrations
 from django.db.models import Count, F
 
 
diff --git a/chrono/manager/widgets.py b/chrono/manager/widgets.py
index 75403ff..a5f8f53 100644
--- a/chrono/manager/widgets.py
+++ b/chrono/manager/widgets.py
@@ -17,7 +17,6 @@
 
 from django.forms.fields import SplitDateTimeField
 from django.forms.widgets import CheckboxSelectMultiple, SplitDateTimeWidget, TimeInput
-from django.utils.safestring import mark_safe
 
 
 class SplitDateTimeWidget(SplitDateTimeWidget):
diff --git a/chrono/settings.py b/chrono/settings.py
index 530d6d1..90f1d45 100644
--- a/chrono/settings.py
+++ b/chrono/settings.py
@@ -174,7 +174,7 @@ REQUESTS_PROXIES = None
 REQUESTS_TIMEOUT = 28
 
 try:
-    import workalendar
+    import workalendar  # noqa pylint: disable=unused-import
 
     WORKING_DAY_CALENDAR = 'workalendar.europe.France'
     EXCEPTIONS_SOURCES = {
diff --git a/chrono/urls_utils.py b/chrono/urls_utils.py
index 9c5d131..b4c7024 100644
--- a/chrono/urls_utils.py
+++ b/chrono/urls_utils.py
@@ -17,11 +17,6 @@
 # Decorating URL includes, <https://djangosnippets.org/snippets/2532/>
 
 import django
-from django.contrib.auth.decorators import user_passes_test
-from django.core.exceptions import PermissionDenied
-from django.db.models import Q
-
-from .agendas.models import Agenda, UnavailabilityCalendar
 
 if django.VERSION < (2, 0, 0):
     from django.urls.resolvers import RegexURLPattern as URLPattern
diff --git a/chrono/utils/signature.py b/chrono/utils/signature.py
index 0cc74c7..03b929d 100644
--- a/chrono/utils/signature.py
+++ b/chrono/utils/signature.py
@@ -21,7 +21,6 @@ import hmac
 import random
 
 from django.conf import settings
-from django.utils import six
 from django.utils.encoding import smart_bytes
 from django.utils.http import quote, urlencode
 from django.utils.six.moves.urllib import parse as urlparse
diff --git a/tests/test_import_export.py b/tests/test_import_export.py
index c8b4031..ff5bf62 100644
--- a/tests/test_import_export.py
+++ b/tests/test_import_export.py
@@ -13,7 +13,6 @@ from io import StringIO
 
 import mock
 import pytest
-from dateutil.rrule import DAILY
 from django.contrib.auth.models import Group
 from django.core.management import CommandError, call_command
 from django.test import override_settings
diff --git a/tests/test_sso.py b/tests/test_sso.py
index 8e521ab..f364e92 100644
--- a/tests/test_sso.py
+++ b/tests/test_sso.py
@@ -1,8 +1,6 @@
 import pytest
 from django.test import override_settings
 
-from chrono.wsgi import application
-
 pytestmark = pytest.mark.django_db
 
 
-- 
2.30.2

