fix: Remove unused imports

This commit is contained in:
Cristian 2020-08-28 10:06:48 -05:00
parent bc116c25f8
commit b3ec170e39
3 changed files with 3 additions and 10 deletions

View file

@ -2,7 +2,6 @@ __package__ = 'archivebox.core'
from io import StringIO
from contextlib import redirect_stdout
from pathlib import Path
from django.contrib import admin
from django.urls import path

View file

@ -33,4 +33,4 @@ def get_icons(snapshot: Snapshot) -> str:
*link_tuple(link, 'media_path')[:2], any((out_dir / canon['media_path']).glob('*')),
*link_tuple(link, 'git_path')[:2], any((out_dir / canon['git_path']).glob('*')),
canon['archive_org_path'], (out_dir / 'archive.org.txt').exists(),
)
)

View file

@ -6,7 +6,6 @@ from contextlib import redirect_stdout
from django.shortcuts import render, redirect
from django.http import HttpResponse
from django.db.models import Q
from django.views import View, static
from django.views.generic.list import ListView
from django.views.generic import FormView
@ -16,13 +15,8 @@ from core.models import Snapshot
from core.utils import get_icons
from core.forms import AddLinkForm
from ..index import load_main_index, load_main_index_meta
from ..config import (
OUTPUT_DIR,
VERSION,
FOOTER_INFO,
PUBLIC_INDEX,
PUBLIC_SNAPSHOTS,
PUBLIC_ADD_VIEW
@ -125,7 +119,7 @@ class AddView(UserPassesTestMixin, FormView):
def get_context_data(self, *args, **kwargs):
context = super().get_context_data(*args, **kwargs)
context["title"]: "Add URLs"
context["title"] = "Add URLs"
return context
def form_valid(self, form):
@ -149,4 +143,4 @@ class AddView(UserPassesTestMixin, FormView):
"stdout": ansi_to_html(add_stdout.getvalue().strip()),
"form": AddLinkForm()
})
return render(template_name=self.template_name, request=self.request, context=context)
return render(template_name=self.template_name, request=self.request, context=context)