Linting code

This commit is contained in:
jeffser 2024-08-04 21:57:57 -06:00
parent 4b6cd17d0a
commit 4446b42b82
2 changed files with 7 additions and 11 deletions

View File

@ -4,7 +4,7 @@ Handles the table widget shown in chat responses
""" """
import gi import gi
from gi.repository import Adw gi.require_version('Gtk', '4.0')
from gi.repository import Gtk, GObject, Gio from gi.repository import Gtk, GObject, Gio
import re import re

View File

@ -19,8 +19,7 @@
""" """
Handles the main window Handles the main window
""" """
import json, requests, threading, os, re, base64, sys, gettext, locale, subprocess, uuid, shutil, tarfile, tempfile, logging, random import json, threading, os, re, base64, sys, gettext, uuid, shutil, tarfile, tempfile, logging
from time import sleep
from io import BytesIO from io import BytesIO
from PIL import Image from PIL import Image
from pypdf import PdfReader from pypdf import PdfReader
@ -147,7 +146,6 @@ class AlpacaWindow(Adw.ApplicationWindow):
if content['type'] == 'image': if content['type'] == 'image':
content['button'].set_css_classes(["flat"]) content['button'].set_css_classes(["flat"])
return True return True
else:
for name, content in self.attachments.items(): for name, content in self.attachments.items():
if content['type'] == 'image': if content['type'] == 'image':
content['button'].set_css_classes(["flat", "error"]) content['button'].set_css_classes(["flat", "error"])
@ -808,7 +806,6 @@ Generate a title following these rules:
self.model_string_list.append(model_name) self.model_string_list.append(model_name)
self.local_models.append(model["name"]) self.local_models.append(model["name"])
#self.verify_if_image_can_be_used() #self.verify_if_image_can_be_used()
return
else: else:
self.connection_error() self.connection_error()
@ -974,7 +971,6 @@ Generate a title following these rules:
return date.format("%H:%M %p") return date.format("%H:%M %p")
elif date.format("%Y") == current_date.format("%Y"): elif date.format("%Y") == current_date.format("%Y"):
return date.format("%b %d, %H:%M %p") return date.format("%b %d, %H:%M %p")
else:
return date.format("%b %d %Y, %H:%M %p") return date.format("%b %d %Y, %H:%M %p")
def update_bot_message(self, data, message_id): def update_bot_message(self, data, message_id):