mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-12 09:34:50 +02:00
remove dependencies on unneeded libraries
This commit is contained in:
@@ -8,7 +8,6 @@ from django.utils.html import format_html, mark_safe
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.urls import reverse, resolve
|
||||
from django.utils import timezone
|
||||
from django_jsonform.forms.fields import JSONFormField
|
||||
|
||||
from huey_monitor.admin import TaskModel
|
||||
|
||||
@@ -83,7 +82,7 @@ class ArchiveResultInline(admin.TabularInline):
|
||||
formset.form.base_fields['cmd_version'].initial = '-'
|
||||
formset.form.base_fields['pwd'].initial = str(snapshot.link_dir)
|
||||
formset.form.base_fields['created_by'].initial = request.user
|
||||
formset.form.base_fields['cmd'] = JSONFormField(initial=['-'])
|
||||
formset.form.base_fields['cmd'].initial = '["-"]'
|
||||
formset.form.base_fields['output'].initial = 'Manually recorded cmd output...'
|
||||
|
||||
if obj is not None:
|
||||
|
@@ -56,7 +56,6 @@ INSTALLED_APPS = [
|
||||
'django.contrib.admin',
|
||||
|
||||
# 3rd-party apps from PyPI
|
||||
'django_jsonform', # handles rendering Pydantic models to Django HTML widgets/forms https://github.com/bhch/django-jsonform
|
||||
'signal_webhooks', # handles REST API outbound webhooks https://github.com/MrThearMan/django-signal-webhooks
|
||||
'django_object_actions', # provides easy Django Admin action buttons on change views https://github.com/crccheck/django-object-actions
|
||||
|
||||
|
@@ -80,15 +80,6 @@ def get_fd_info(fd) -> Dict[str, Any]:
|
||||
# debug_dict_summary(get_fd_info(sys.stderr))
|
||||
|
||||
|
||||
|
||||
class SmartFormatter(DjangoHelpFormatter, RichHelpFormatter):
|
||||
"""Patched formatter that prints newlines in argparse help strings"""
|
||||
def _split_lines(self, text, width):
|
||||
if '\n' in text:
|
||||
return text.splitlines()
|
||||
return RichHelpFormatter._split_lines(self, text, width)
|
||||
|
||||
|
||||
def reject_stdin(caller: str, stdin: Optional[IO]=sys.stdin) -> None:
|
||||
"""Tell the user they passed stdin to a command that doesn't accept it"""
|
||||
|
||||
|
@@ -4,8 +4,7 @@ import os
|
||||
import sys
|
||||
import re
|
||||
from pathlib import Path
|
||||
from typing import Type, Tuple, Callable, ClassVar, Dict, Any
|
||||
from typing_extensions import Annotated
|
||||
from typing import Type, Tuple, Callable, ClassVar, Dict, Any, Annotated
|
||||
|
||||
import toml
|
||||
from rich import print
|
||||
|
@@ -10,9 +10,8 @@ import inspect
|
||||
import importlib
|
||||
import itertools
|
||||
from pathlib import Path
|
||||
from typing import Dict, Callable, List, Set, Tuple, Iterable, Any, TypeVar, TypedDict, Type, cast, Generic, Mapping, overload, Final, ParamSpec, Literal, Protocol
|
||||
from typing import Dict, Callable, List, Set, Tuple, Iterable, Any, TypeVar, TypedDict, Type, cast, Generic, Mapping, overload, Final, ParamSpec, Literal, Protocol, Annotated
|
||||
from types import ModuleType
|
||||
from typing_extensions import Annotated
|
||||
from functools import cache
|
||||
|
||||
from benedict import benedict
|
||||
|
Reference in New Issue
Block a user