Skip to content

Commit

Permalink
Lint fixes and added lint config file
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffser committed Aug 5, 2024
1 parent ccb59c7 commit 1fbd6a0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
14 changes: 9 additions & 5 deletions src/connection_handler.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# connection_handler.py
import json, requests
"""
Handles requests to remote and integrated instances of Ollama
"""
import json
import requests
#OK=200 response.status_code
url = None
bearer_token = None
URL = None
BEARER_TOKEN = None

def get_headers(include_json:bool) -> dict:
headers = {}
if include_json:
headers["Content-Type"] = "application/json"
if bearer_token:
headers["Authorization"] = "Bearer {}".format(bearer_token)
if BEARER_TOKEN:
headers["Authorization"] = "Bearer {}".format(BEARER_TOKEN)
return headers if len(headers.keys()) > 0 else None

def simple_get(connection_url:str) -> dict:
Expand Down
9 changes: 6 additions & 3 deletions src/dialogs.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# dialogs.py

from gi.repository import Adw, Gtk, Gdk, GLib, GtkSource, Gio, GdkPixbuf
import os, logging
"""
Handles UI dialogs
"""
import os
import logging
from pytube import YouTube
from html2text import html2text
from . import connection_handler
from gi.repository import Adw, Gtk

logger = logging.getLogger(__name__)
# CLEAR CHAT | WORKS
Expand Down
4 changes: 4 additions & 0 deletions unsaved file 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[MASTER]

[TYPECHECK]
ignored-variables=_

0 comments on commit 1fbd6a0

Please sign in to comment.