Skip to content

Commit

Permalink
Linting code
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffser committed Aug 5, 2024
1 parent 6ba3719 commit 1a6e742
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
3 changes: 1 addition & 2 deletions src/local_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"""
import subprocess
import os
import threading
from time import sleep
from logging import getLogger
from .internal import data_dir, cache_dir
Expand All @@ -19,7 +18,7 @@
def start():
if not os.path.isdir(os.path.join(cache_dir, 'tmp/ollama')):
os.mkdir(os.path.join(cache_dir, 'tmp/ollama'))
global instance, overrides
global instance
params = overrides.copy()
params["OLLAMA_HOST"] = f"127.0.0.1:{port}" # You can't change this directly sorry :3
params["HOME"] = data_dir
Expand Down
10 changes: 5 additions & 5 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@
"""
Main script run at launch, handles actions, about dialog and the app itself (not the window)
"""
import sys
import logging
import gi
import os

gi.require_version('Gtk', '4.0')
gi.require_version('Adw', '1')

from gi.repository import Gtk, Gio, Adw, GLib

from .window import AlpacaWindow
from .internal import cache_dir, data_dir

import sys
import logging
import gi
import os

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion src/table_widget.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#table_widget
#table_widget.py
"""
Handles the table widget shown in chat responses
"""
Expand Down
12 changes: 7 additions & 5 deletions src/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,19 @@
"""
Handles the main window
"""

import gi
gi.require_version('GtkSource', '5')
gi.require_version('GdkPixbuf', '2.0')
from gi.repository import Adw, Gtk, Gdk, GLib, GtkSource, Gio, GdkPixbuf
import json, requests, threading, os, re, base64, sys, gettext, locale, subprocess, uuid, shutil, tarfile, tempfile, logging, random
from time import sleep
from io import BytesIO
from PIL import Image
from pypdf import PdfReader
from datetime import datetime

import gi
gi.require_version('GtkSource', '5')
gi.require_version('GdkPixbuf', '2.0')

from gi.repository import Adw, Gtk, Gdk, GLib, GtkSource, Gio, GdkPixbuf

from . import dialogs, local_instance, connection_handler, available_models_descriptions
from .table_widget import TableWidget
from .internal import config_dir, data_dir, cache_dir, source_dir
Expand Down

0 comments on commit 1a6e742

Please sign in to comment.