Linting code
This commit is contained in:
parent
4b6cd17d0a
commit
4446b42b82
@ -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
|
||||||
|
@ -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,11 +146,10 @@ 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"])
|
return False
|
||||||
return False
|
|
||||||
|
|
||||||
@Gtk.Template.Callback()
|
@Gtk.Template.Callback()
|
||||||
def stop_message(self, button=None):
|
def stop_message(self, button=None):
|
||||||
@ -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,8 +971,7 @@ 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):
|
||||||
if self.bot_message is None:
|
if self.bot_message is None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user