remove dependencies on unneeded libraries

This commit is contained in:
Nick Sweeting 2024-12-18 18:07:33 -08:00
parent eee9f67df2
commit 7975b47c85
No known key found for this signature in database
5 changed files with 3 additions and 16 deletions

View file

@ -8,7 +8,6 @@ from django.utils.html import format_html, mark_safe
from django.core.exceptions import ValidationError from django.core.exceptions import ValidationError
from django.urls import reverse, resolve from django.urls import reverse, resolve
from django.utils import timezone from django.utils import timezone
from django_jsonform.forms.fields import JSONFormField
from huey_monitor.admin import TaskModel 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['cmd_version'].initial = '-'
formset.form.base_fields['pwd'].initial = str(snapshot.link_dir) formset.form.base_fields['pwd'].initial = str(snapshot.link_dir)
formset.form.base_fields['created_by'].initial = request.user 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...' formset.form.base_fields['output'].initial = 'Manually recorded cmd output...'
if obj is not None: if obj is not None:

View file

@ -56,7 +56,6 @@ INSTALLED_APPS = [
'django.contrib.admin', 'django.contrib.admin',
# 3rd-party apps from PyPI # 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 '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 'django_object_actions', # provides easy Django Admin action buttons on change views https://github.com/crccheck/django-object-actions

View file

@ -80,15 +80,6 @@ def get_fd_info(fd) -> Dict[str, Any]:
# debug_dict_summary(get_fd_info(sys.stderr)) # 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: 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""" """Tell the user they passed stdin to a command that doesn't accept it"""

View file

@ -4,8 +4,7 @@ import os
import sys import sys
import re import re
from pathlib import Path from pathlib import Path
from typing import Type, Tuple, Callable, ClassVar, Dict, Any from typing import Type, Tuple, Callable, ClassVar, Dict, Any, Annotated
from typing_extensions import Annotated
import toml import toml
from rich import print from rich import print

View file

@ -10,9 +10,8 @@ import inspect
import importlib import importlib
import itertools import itertools
from pathlib import Path 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 types import ModuleType
from typing_extensions import Annotated
from functools import cache from functools import cache
from benedict import benedict from benedict import benedict